Title: [249534] trunk
- Revision
- 249534
- Author
- [email protected]
- Date
- 2019-09-05 10:27:14 -0700 (Thu, 05 Sep 2019)
Log Message
AX: children cache are not re-computed if tab index is removed
https://bugs.webkit.org/show_bug.cgi?id=201502
Reviewed by Zalan Bujtas.
Source/WebCore:
Test: accessibility/tabindex-removed.html
If the tabindex changes, it can potentially affect whether an element is accessible. If we don't update the children cache
information can be stale and lead to incorrect navigation with VoiceOver.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::handleAttributeChange):
LayoutTests:
* accessibility/tabindex-removed-expected.txt: Added.
* accessibility/tabindex-removed.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (249533 => 249534)
--- trunk/LayoutTests/ChangeLog 2019-09-05 17:11:54 UTC (rev 249533)
+++ trunk/LayoutTests/ChangeLog 2019-09-05 17:27:14 UTC (rev 249534)
@@ -1,3 +1,13 @@
+2019-09-05 Chris Fleizach <[email protected]>
+
+ AX: children cache are not re-computed if tab index is removed
+ https://bugs.webkit.org/show_bug.cgi?id=201502
+
+ Reviewed by Zalan Bujtas.
+
+ * accessibility/tabindex-removed-expected.txt: Added.
+ * accessibility/tabindex-removed.html: Added.
+
2019-09-04 Fujii Hironori <[email protected]>
[AppleWin] fast/block/float/float-with-anonymous-previous-sibling.html is failing as flaky ImageOnlyFailure
Added: trunk/LayoutTests/accessibility/tabindex-removed-expected.txt (0 => 249534)
--- trunk/LayoutTests/accessibility/tabindex-removed-expected.txt (rev 0)
+++ trunk/LayoutTests/accessibility/tabindex-removed-expected.txt 2019-09-05 17:27:14 UTC (rev 249534)
@@ -0,0 +1,16 @@
+ test
+This tests that when tabindex is updated on an element, the children are re-computed.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS group.childAtIndex(0).parentElement().isEqual(group) is true
+PASS button.parentElement().isEqual(group) is true
+PASS group.parentElement().isEqual(main) is true
+PASS main.childAtIndex(0).isEqual(group) is true
+PASS main.childAtIndex(0).isEqual(button) is true
+PASS button.parentElement().isEqual(main) is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/accessibility/tabindex-removed.html (0 => 249534)
--- trunk/LayoutTests/accessibility/tabindex-removed.html (rev 0)
+++ trunk/LayoutTests/accessibility/tabindex-removed.html 2019-09-05 17:27:14 UTC (rev 249534)
@@ -0,0 +1,41 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+
+<main id="main">
+
+<div style="display:inline" tabindex="0">
+<button id="button">test</button>
+</div>
+
+</main>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+ description("This tests that when tabindex is updated on an element, the children are re-computed.")
+
+ if (window.accessibilityController) {
+ var main = accessibilityController.accessibleElementById("main");
+ var group = main.childAtIndex(0);
+ var button = accessibilityController.accessibleElementById("button");
+
+ shouldBeTrue("group.childAtIndex(0).parentElement().isEqual(group)");
+ shouldBeTrue("button.parentElement().isEqual(group)");
+ shouldBeTrue("group.parentElement().isEqual(main)");
+ shouldBeTrue("main.childAtIndex(0).isEqual(group)");
+
+ // Removing the tabindex updates children
+ document.getElementById("main").children[0].removeAttribute("tabindex");
+
+ shouldBeTrue("main.childAtIndex(0).isEqual(button)");
+ shouldBeTrue("button.parentElement().isEqual(main)");
+ }
+</script>
+<script src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (249533 => 249534)
--- trunk/Source/WebCore/ChangeLog 2019-09-05 17:11:54 UTC (rev 249533)
+++ trunk/Source/WebCore/ChangeLog 2019-09-05 17:27:14 UTC (rev 249534)
@@ -1,3 +1,18 @@
+2019-09-05 Chris Fleizach <[email protected]>
+
+ AX: children cache are not re-computed if tab index is removed
+ https://bugs.webkit.org/show_bug.cgi?id=201502
+
+ Reviewed by Zalan Bujtas.
+
+ Test: accessibility/tabindex-removed.html
+
+ If the tabindex changes, it can potentially affect whether an element is accessible. If we don't update the children cache
+ information can be stale and lead to incorrect navigation with VoiceOver.
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::handleAttributeChange):
+
2019-09-05 Konstantin Tokarev <[email protected]>
Don't call PlatformMediaSessionManager methods when neither VIDEO nor WEB_AUDIO is enabled
Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (249533 => 249534)
--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp 2019-09-05 17:11:54 UTC (rev 249533)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp 2019-09-05 17:27:14 UTC (rev 249534)
@@ -1496,6 +1496,8 @@
textChanged(element);
else if (attrName == forAttr && is<HTMLLabelElement>(*element))
labelChanged(element);
+ else if (attrName == tabindexAttr)
+ childrenChanged(element->parentNode(), element);
if (!attrName.localName().string().startsWith("aria-"))
return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes