Fix accessibility/aria-invalid.html in isolated tree mode
commit63f3776bebcc014e3288552b41b554bbdc64712d
authortyler_w@apple.com <tyler_w@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 10 Apr 2022 07:29:13 +0000 (10 07:29 +0000)
committertyler_w@apple.com <tyler_w@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 10 Apr 2022 07:29:13 +0000 (10 07:29 +0000)
treebf9a0ec85f124f55bd8ada6c42befbda7d6afe70
parent00b1fee9d0387ae888a8b866d2d4ee7e86345b94
Fix accessibility/aria-invalid.html in isolated tree mode
https://bugs.webkit.org/show_bug.cgi?id=238978

Reviewed by Chris Fleizach.

Source/WebCore:

With this patch, we update the isolated tree when the aria-invalid
attribute changes.

Fixes accessibility/aria-invalid.html in isolated tree mode.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::updateIsolatedTree):
* accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::updateNodeProperty):
Drive-by re-ordering of `case AXPropertyName::IdentifierAttribute` such that this
function handles properties in alphabetical order.

LayoutTests:

* accessibility/aria-invalid-expected.txt:
* accessibility/aria-invalid.html:
Rewrite to call `debug` only once at the end of the test. Also made
this test use accessibleElementById instead of
accessibilityController.focusedElement.
* resources/accessibility-helper.js:
Add new `expect` function, which is like the more ubiquitous
`shouldBe` from js-test.js, but returns the output as a string instead
of calling `debug` to output to a console DOM element.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@292686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/accessibility/aria-invalid-expected.txt
LayoutTests/accessibility/aria-invalid.html
LayoutTests/resources/accessibility-helper.js
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AXObjectCache.cpp
Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp