Title: [273328] trunk
Revision
273328
Author
cfleiz...@apple.com
Date
2021-02-23 12:04:05 -0800 (Tue, 23 Feb 2021)

Log Message

AX: VoiceOver incorrectly announces groups in ARIA tree instances as empty
https://bugs.webkit.org/show_bug.cgi?id=221716
<rdar://problem/74205567>

Reviewed by Zalan Bujtas.

Source/WebCore:

ARIA treeitems are allowed to have a child group that can represent the disclosed rows, which are disclosed through aria-owns.

Test: accessibility/mac/treeitem-row-delegation.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::ariaTreeRows):

LayoutTests:

* accessibility/mac/treeitem-row-delegation-expected.txt: Added.
* accessibility/mac/treeitem-row-delegation.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (273327 => 273328)


--- trunk/LayoutTests/ChangeLog	2021-02-23 19:55:26 UTC (rev 273327)
+++ trunk/LayoutTests/ChangeLog	2021-02-23 20:04:05 UTC (rev 273328)
@@ -1,3 +1,14 @@
+2021-02-23  Chris Fleizach  <cfleiz...@apple.com>
+
+        AX: VoiceOver incorrectly announces groups in ARIA tree instances as empty
+        https://bugs.webkit.org/show_bug.cgi?id=221716
+        <rdar://problem/74205567>
+
+        Reviewed by Zalan Bujtas.
+
+        * accessibility/mac/treeitem-row-delegation-expected.txt: Added.
+        * accessibility/mac/treeitem-row-delegation.html: Added.
+
 2021-02-22  Ryan Haddad  <ryanhad...@apple.com>
 
         [BigSur] imported/w3c/web-platform-tests/css/css-counter-styles/tibetan/css3-counter-styles-156.html is consistently failing

Added: trunk/LayoutTests/accessibility/mac/treeitem-row-delegation-expected.txt (0 => 273328)


--- trunk/LayoutTests/accessibility/mac/treeitem-row-delegation-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/accessibility/mac/treeitem-row-delegation-expected.txt	2021-02-23 20:04:05 UTC (rev 273328)
@@ -0,0 +1,11 @@
+This tests that a treeitem was a group that uses aria-owns will report its disclosed rows correctly.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS treeitem2.isEqual(accessibilityController.accessibleElementById('group1-item1')) is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Jungle Animals
+Lions

Added: trunk/LayoutTests/accessibility/mac/treeitem-row-delegation.html (0 => 273328)


--- trunk/LayoutTests/accessibility/mac/treeitem-row-delegation.html	                        (rev 0)
+++ trunk/LayoutTests/accessibility/mac/treeitem-row-delegation.html	2021-02-23 20:04:05 UTC (rev 273328)
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+<script src=""
+</head>
+
+<body id="body">
+
+<div id="tree" role="tree">
+    <div id="item-1" role="treeitem" aria-level="1" aria-expanded="true" tabindex="0">Jungle Animals
+        <div role="group" aria-owns="group1-item1 group1-item2 group1-item3"></div>
+    </div>
+    <div id="group1-item1" role="treeitem" aria-level="2" aria-setsize="3" aria-posinset="1" aria-current="page">Lions</div>
+</div>
+
+<script>
+    description("This tests that a treeitem was a group that uses aria-owns will report its disclosed rows correctly.");
+
+    if (window.accessibilityController) {
+       var treeitem = accessibilityController.accessibleElementById("item-1");
+       var treeitem2 = treeitem.disclosedRowAtIndex(0);
+       shouldBeTrue("treeitem2.isEqual(accessibilityController.accessibleElementById('group1-item1'))");
+    }
+</script>
+<script src=""
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (273327 => 273328)


--- trunk/Source/WebCore/ChangeLog	2021-02-23 19:55:26 UTC (rev 273327)
+++ trunk/Source/WebCore/ChangeLog	2021-02-23 20:04:05 UTC (rev 273328)
@@ -1,3 +1,18 @@
+2021-02-23  Chris Fleizach  <cfleiz...@apple.com>
+
+        AX: VoiceOver incorrectly announces groups in ARIA tree instances as empty
+        https://bugs.webkit.org/show_bug.cgi?id=221716
+        <rdar://problem/74205567>
+
+        Reviewed by Zalan Bujtas.
+
+        ARIA treeitems are allowed to have a child group that can represent the disclosed rows, which are disclosed through aria-owns.
+
+        Test: accessibility/mac/treeitem-row-delegation.html
+
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::ariaTreeRows):
+
 2021-02-23  Rob Buis  <rb...@igalia.com>
 
         aspect-ratio shows in computed style when disabled

Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (273327 => 273328)


--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp	2021-02-23 19:55:26 UTC (rev 273327)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp	2021-02-23 20:04:05 UTC (rev 273328)
@@ -1694,6 +1694,14 @@
 
 void AccessibilityObject::ariaTreeRows(AccessibilityChildrenVector& result)
 {
+    // If the element specifies its tree rows through aria-owns, return that first.
+    AccessibilityChildrenVector ariaOwns;
+    ariaOwnsElements(ariaOwns);
+    if (ariaOwns.size()) {
+        result.appendVector(ariaOwns);
+        return;
+    }
+    
     for (const auto& child : children()) {
         // Add tree items as the rows.
         if (child->roleValue() == AccessibilityRole::TreeItem)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to