Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
AX: Dynamic aria-disabled changes don't update AXPropertyName::IsEnab…
…led for descendants https://bugs.webkit.org/show_bug.cgi?id=248108 rdar://problem/102534000 Reviewed by Chris Fleizach. With this patch, when an object's disabled state changes, we now update AXPropertyName::IsEnabled and AXPropertyName::CanSetFocusAttribute for its descendants, too. This is required because aria-disabled also disables all descendants: https://w3c.github.io/aria/#aria-disabled > The state of being disabled applies to the element with aria-disabled and all focusable descendant elements of the element on which the aria-disabled attribute is applied. * LayoutTests/accessibility/dynamic-attribute-changes-should-update-isenabled-expected.txt: * LayoutTests/accessibility/dynamic-attribute-changes-should-update-isenabled.html: * LayoutTests/resources/accessibility-helper.js: * Source/WebCore/accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::updateIsolatedTree): * Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp: (WebCore::AXIsolatedTree::updatePropertiesForSelfAndDescendants): (WebCore::AXIsolatedTree::updateNodeProperties): (WebCore::AXIsolatedTree::updateNodeProperty): * Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h: (WebCore::AXIsolatedTree::updateNodeProperty): Canonical link: https://commits.webkit.org/257159@main
- Loading branch information
Showing
6 changed files
with
210 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,34 @@ | ||
This test ensures that dynamically changing elements disabled and aria-disabled attributes properly updates their isEnabled property. | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
Verifying initial element enabled state. | ||
PASS axButton.isEnabled is true | ||
PASS axOption.isEnabled is true | ||
domButton.ariaDisabled = true | ||
PASS axButton.isEnabled === false | ||
domButton.ariaDisabled = false | ||
PASS axButton.isEnabled === true | ||
domButton.disabled = true | ||
PASS axButton.isEnabled === false | ||
domButton.disabled = false | ||
PASS axButton.isEnabled === true | ||
domOption.ariaDisabled = true | ||
PASS axOption.isEnabled === false | ||
domOption.ariaDisabled = false | ||
PASS axOption.isEnabled === true | ||
domOption.disabled = true | ||
PASS axOption.isEnabled === false | ||
domOption.disabled = false | ||
PASS axOption.isEnabled === true | ||
PASS: axButton.isEnabled === true | ||
PASS: axOption.isEnabled === true | ||
PASS: axRadio1.isEnabled === true | ||
PASS: axRadio2.isEnabled === true | ||
document.getElementById('button').ariaDisabled = true | ||
PASS: axButton.isEnabled === false | ||
document.getElementById('button').ariaDisabled = false | ||
PASS: axButton.isEnabled === true | ||
document.getElementById('button').disabled = true | ||
PASS: axButton.isEnabled === false | ||
document.getElementById('button').disabled = false | ||
PASS: axButton.isEnabled === true | ||
document.getElementById('option1').ariaDisabled = true | ||
PASS: axOption.isEnabled === false | ||
document.getElementById('option1').ariaDisabled = false | ||
PASS: axOption.isEnabled === true | ||
document.getElementById('option1').disabled = true | ||
PASS: axOption.isEnabled === false | ||
document.getElementById('option1').disabled = false | ||
PASS: axOption.isEnabled === true | ||
document.getElementById('fieldset').ariaDisabled = true | ||
PASS: axRadio1.isEnabled === false | ||
PASS: axRadio2.isEnabled === false | ||
document.getElementById('fieldset').ariaDisabled = false | ||
PASS: axRadio1.isEnabled === true | ||
PASS: axRadio2.isEnabled === true | ||
|
||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
Click me | ||
Click me Foo label Bar label |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.