Title: [249694] branches/safari-608-branch
- Revision
- 249694
- Author
- alanc...@apple.com
- Date
- 2019-09-09 20:19:45 -0700 (Mon, 09 Sep 2019)
Log Message
Cherry-pick r249534. rdar://problem/55183098
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-branch/LayoutTests/ChangeLog (249693 => 249694)
--- branches/safari-608-branch/LayoutTests/ChangeLog 2019-09-10 03:19:42 UTC (rev 249693)
+++ branches/safari-608-branch/LayoutTests/ChangeLog 2019-09-10 03:19:45 UTC (rev 249694)
@@ -1,3 +1,40 @@
+2019-09-09 Kocsen Chung <kocsen_ch...@apple.com>
+
+ Cherry-pick r249534. rdar://problem/55183098
+
+ 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 <cfleiz...@apple.com>
+
+ 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-05 Kocsen Chung <kocsen_ch...@apple.com>
Apply patch. rdar://problem/55001140
Added: branches/safari-608-branch/LayoutTests/accessibility/tabindex-removed-expected.txt (0 => 249694)
--- branches/safari-608-branch/LayoutTests/accessibility/tabindex-removed-expected.txt (rev 0)
+++ branches/safari-608-branch/LayoutTests/accessibility/tabindex-removed-expected.txt 2019-09-10 03:19:45 UTC (rev 249694)
@@ -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-branch/LayoutTests/accessibility/tabindex-removed.html (0 => 249694)
--- branches/safari-608-branch/LayoutTests/accessibility/tabindex-removed.html (rev 0)
+++ branches/safari-608-branch/LayoutTests/accessibility/tabindex-removed.html 2019-09-10 03:19:45 UTC (rev 249694)
@@ -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-branch/Source/WebCore/ChangeLog (249693 => 249694)
--- branches/safari-608-branch/Source/WebCore/ChangeLog 2019-09-10 03:19:42 UTC (rev 249693)
+++ branches/safari-608-branch/Source/WebCore/ChangeLog 2019-09-10 03:19:45 UTC (rev 249694)
@@ -1,5 +1,47 @@
2019-09-09 Kocsen Chung <kocsen_ch...@apple.com>
+ Cherry-pick r249534. rdar://problem/55183098
+
+ 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 <cfleiz...@apple.com>
+
+ 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-09 Kocsen Chung <kocsen_ch...@apple.com>
+
Cherry-pick r249493. rdar://problem/55182906
[iPadOS] Unable to change sheets on Airtable.com
Modified: branches/safari-608-branch/Source/WebCore/accessibility/AXObjectCache.cpp (249693 => 249694)
--- branches/safari-608-branch/Source/WebCore/accessibility/AXObjectCache.cpp 2019-09-10 03:19:42 UTC (rev 249693)
+++ branches/safari-608-branch/Source/WebCore/accessibility/AXObjectCache.cpp 2019-09-10 03:19:45 UTC (rev 249694)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes