Title: [232285] trunk
Revision
232285
Author
n_w...@apple.com
Date
2018-05-29 21:01:14 -0700 (Tue, 29 May 2018)

Log Message

AX: macOS VoiceOver doesn't announce when details element is expanded when using role group
https://bugs.webkit.org/show_bug.cgi?id=180866
<rdar://problem/36074338>

Reviewed by Chris Fleizach.

Source/WebCore:

We should use is<HTMLDetailsElement> to check for the details parent instead
of using the role.

Added test cases to the existing test.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isExpanded const):

LayoutTests:

* accessibility/mac/details-summary-expected.txt:
* accessibility/mac/details-summary.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (232284 => 232285)


--- trunk/LayoutTests/ChangeLog	2018-05-30 03:36:34 UTC (rev 232284)
+++ trunk/LayoutTests/ChangeLog	2018-05-30 04:01:14 UTC (rev 232285)
@@ -1,3 +1,14 @@
+2018-05-29  Nan Wang  <n_w...@apple.com>
+
+        AX: macOS VoiceOver doesn't announce when details element is expanded when using role group
+        https://bugs.webkit.org/show_bug.cgi?id=180866
+        <rdar://problem/36074338>
+
+        Reviewed by Chris Fleizach.
+
+        * accessibility/mac/details-summary-expected.txt:
+        * accessibility/mac/details-summary.html:
+
 2018-05-29  Tadeu Zagallo  <tzaga...@apple.com>
 
         Don't assert on m_actionsStart when setting actions on DFA nodes

Modified: trunk/LayoutTests/accessibility/mac/details-summary-expected.txt (232284 => 232285)


--- trunk/LayoutTests/accessibility/mac/details-summary-expected.txt	2018-05-30 03:36:34 UTC (rev 232284)
+++ trunk/LayoutTests/accessibility/mac/details-summary-expected.txt	2018-05-30 04:01:14 UTC (rev 232285)
@@ -2,6 +2,9 @@
 Details about the open topic.
 
 Some open info
+Some open info
+Details about the open topic.
+
 This tests some basic attributes about the details element.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
@@ -24,6 +27,8 @@
 PASS summary1.isExpanded is true
 PASS details2.subrole is 'AXSubrole: AXDetails'
 PASS details2.isExpanded is false
+PASS details3.subrole is 'AXSubrole: AXApplicationGroup'
+PASS details3.isExpanded is true
 Received AXExpandedChanged notification 
 Received AXExpandedChanged notification 
 PASS successfullyParsed is true

Modified: trunk/LayoutTests/accessibility/mac/details-summary.html (232284 => 232285)


--- trunk/LayoutTests/accessibility/mac/details-summary.html	2018-05-30 03:36:34 UTC (rev 232284)
+++ trunk/LayoutTests/accessibility/mac/details-summary.html	2018-05-30 04:01:14 UTC (rev 232285)
@@ -15,6 +15,11 @@
   <p>Details about the open topic.</p>
 </details>
 
+<details open id="details3" role="group">
+  <summary>Some open info</summary>
+  <p>Details about the open topic.</p>
+</details>
+
 <p id="description"></p>
 <div id="console"></div>
 
@@ -79,6 +84,11 @@
         var details2 = accessibilityController.accessibleElementById("details2");
         shouldBe("details2.subrole", "'AXSubrole: AXDetails'");
         shouldBeFalse("details2.isExpanded");
+
+        // Expanded status should be correct when detail has group role
+        var details3 = accessibilityController.accessibleElementById("details3");
+        shouldBe("details3.subrole", "'AXSubrole: AXApplicationGroup'");
+        shouldBeTrue("details3.isExpanded");
     }
 
 </script>

Modified: trunk/Source/WebCore/ChangeLog (232284 => 232285)


--- trunk/Source/WebCore/ChangeLog	2018-05-30 03:36:34 UTC (rev 232284)
+++ trunk/Source/WebCore/ChangeLog	2018-05-30 04:01:14 UTC (rev 232285)
@@ -1,3 +1,19 @@
+2018-05-29  Nan Wang  <n_w...@apple.com>
+
+        AX: macOS VoiceOver doesn't announce when details element is expanded when using role group
+        https://bugs.webkit.org/show_bug.cgi?id=180866
+        <rdar://problem/36074338>
+
+        Reviewed by Chris Fleizach.
+
+        We should use is<HTMLDetailsElement> to check for the details parent instead
+        of using the role.
+
+        Added test cases to the existing test.
+
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::isExpanded const):
+
 2018-05-29  Youenn Fablet  <you...@apple.com>
 
         Add a consistency check between URL and CFURL

Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (232284 => 232285)


--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp	2018-05-30 03:36:34 UTC (rev 232284)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp	2018-05-30 04:01:14 UTC (rev 232285)
@@ -2797,7 +2797,7 @@
     // Summary element should use its details parent's expanded status.
     if (isSummary()) {
         if (const AccessibilityObject* parent = AccessibilityObject::matchedParent(*this, false, [] (const AccessibilityObject& object) {
-            return object.roleValue() == AccessibilityRole::Details;
+            return object.node() && is<HTMLDetailsElement>(object.node());
         }))
             return parent->isExpanded();
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to