Title: [249551] branches/safari-608.2.11.1-branch
- Revision
- 249551
- Author
- [email protected]
- Date
- 2019-09-05 16:16:03 -0700 (Thu, 05 Sep 2019)
Log Message
Cherry-pick r249534. rdar://problem/55084674
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.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Added Paths
Diff
Modified: branches/safari-608.2.11.1-branch/LayoutTests/ChangeLog (249550 => 249551)
--- branches/safari-608.2.11.1-branch/LayoutTests/ChangeLog 2019-09-05 23:08:56 UTC (rev 249550)
+++ branches/safari-608.2.11.1-branch/LayoutTests/ChangeLog 2019-09-05 23:16:03 UTC (rev 249551)
@@ -1,3 +1,40 @@
+2019-09-05 Kocsen Chung <[email protected]>
+
+ Cherry-pick r249534. rdar://problem/55084674
+
+ 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.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 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-08-28 Kocsen Chung <[email protected]>
Cherry-pick r249156. rdar://problem/54775048
Added: branches/safari-608.2.11.1-branch/LayoutTests/accessibility/tabindex-removed-expected.txt (0 => 249551)
--- branches/safari-608.2.11.1-branch/LayoutTests/accessibility/tabindex-removed-expected.txt (rev 0)
+++ branches/safari-608.2.11.1-branch/LayoutTests/accessibility/tabindex-removed-expected.txt 2019-09-05 23:16:03 UTC (rev 249551)
@@ -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: branches/safari-608.2.11.1-branch/LayoutTests/accessibility/tabindex-removed.html (0 => 249551)
--- branches/safari-608.2.11.1-branch/LayoutTests/accessibility/tabindex-removed.html (rev 0)
+++ branches/safari-608.2.11.1-branch/LayoutTests/accessibility/tabindex-removed.html 2019-09-05 23:16:03 UTC (rev 249551)
@@ -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: branches/safari-608.2.11.1-branch/Source/WebCore/ChangeLog (249550 => 249551)
--- branches/safari-608.2.11.1-branch/Source/WebCore/ChangeLog 2019-09-05 23:08:56 UTC (rev 249550)
+++ branches/safari-608.2.11.1-branch/Source/WebCore/ChangeLog 2019-09-05 23:16:03 UTC (rev 249551)
@@ -1,3 +1,45 @@
+2019-09-05 Kocsen Chung <[email protected]>
+
+ Cherry-pick r249534. rdar://problem/55084674
+
+ 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.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 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-08-28 Kocsen Chung <[email protected]>
Cherry-pick r249156. rdar://problem/54775048
Modified: branches/safari-608.2.11.1-branch/Source/WebCore/accessibility/AXObjectCache.cpp (249550 => 249551)
--- branches/safari-608.2.11.1-branch/Source/WebCore/accessibility/AXObjectCache.cpp 2019-09-05 23:08:56 UTC (rev 249550)
+++ branches/safari-608.2.11.1-branch/Source/WebCore/accessibility/AXObjectCache.cpp 2019-09-05 23:16:03 UTC (rev 249551)
@@ -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