Title: [214623] trunk
Revision
214623
Author
jcr...@apple.com
Date
2017-03-30 14:13:21 -0700 (Thu, 30 Mar 2017)

Log Message

AX: Expose a new AXSubrole for explicit ARIA "group" role
https://bugs.webkit.org/show_bug.cgi?id=169810
<rdar://problem/31039693>

Reviewed by Chris Fleizach.

Source/WebCore:

Split GroupRole into generics (GroupRole) and explicit groups
(ApplicationGroupRole) so we can expose a subrole on the explicit
groups. Account for the change in ARIA Tree and Menu hierachies.
Update the computedRoleValue for WebKit Inspector usage, too.

Updated existing tests.

Test: accessibility/list-detection2.html:
Test: accessibility/roles-computedRoleString.html:
Test: inspector/dom/getAccessibilityPropertiesForNode.html:
Test: inspector/dom/highlightFrame.html:
Test: inspector/dom/highlightSelector.html:

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::helpText):
(WebCore::AccessibilityNodeObject::hierarchicalLevel):
(WebCore::AccessibilityNodeObject::remapAriaRoleDueToParent):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::accessibleNameDerivesFromContent):
(WebCore::AccessibilityObject::ariaTreeItemContent):
(WebCore::initializeRoleMap):
(WebCore::AccessibilityObject::computedRoleString):
* accessibility/AccessibilityObject.h:
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper subrole]):

Source/WebKit/win:

Account for Windows platform role mapping.

* AccessibleBase.cpp:
(MSAARole):

LayoutTests:

* accessibility/list-detection2-expected.txt:
* accessibility/list-detection2.html:
* accessibility/roles-computedRoleString.html:
* inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
* inspector/dom/highlightFrame-expected.txt:
* inspector/dom/highlightSelector-expected.txt:
* platform/mac/accessibility/roles-computedRoleString-expected.txt:
* platform/mac/accessibility/roles-exposed-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (214622 => 214623)


--- trunk/LayoutTests/ChangeLog	2017-03-30 21:10:54 UTC (rev 214622)
+++ trunk/LayoutTests/ChangeLog	2017-03-30 21:13:21 UTC (rev 214623)
@@ -1,3 +1,20 @@
+2017-03-30  James Craig  <jcr...@apple.com>
+
+        AX: Expose a new AXSubrole for explicit ARIA "group" role
+        https://bugs.webkit.org/show_bug.cgi?id=169810
+        <rdar://problem/31039693>
+
+        Reviewed by Chris Fleizach.
+
+        * accessibility/list-detection2-expected.txt:
+        * accessibility/list-detection2.html:
+        * accessibility/roles-computedRoleString.html:
+        * inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
+        * inspector/dom/highlightFrame-expected.txt:
+        * inspector/dom/highlightSelector-expected.txt:
+        * platform/mac/accessibility/roles-computedRoleString-expected.txt:
+        * platform/mac/accessibility/roles-exposed-expected.txt:
+
 2017-03-30  Youenn Fablet  <you...@apple.com>
 
         webrtc/video-stats.html and webrtc/video-replace-track.html are flaky

Modified: trunk/LayoutTests/accessibility/list-detection2-expected.txt (214622 => 214623)


--- trunk/LayoutTests/accessibility/list-detection2-expected.txt	2017-03-30 21:10:54 UTC (rev 214622)
+++ trunk/LayoutTests/accessibility/list-detection2-expected.txt	2017-03-30 21:13:21 UTC (rev 214623)
@@ -17,9 +17,9 @@
 PASS: ul w/ bullet content on inline ::before -> list. 
 PASS: ol w/ counter content on ::before -> list. 
 PASS: ol w/ counter content on inline ::before -> list. 
-PASS: ul w/ background image (NOT A LIST) -> group. 
-PASS: ul w/ background on ::before (NOT A LIST) -> group. 
-PASS: ul w/o explicit role and displayed inline, which defaults to no markers (NOT A LIST) -> group. 
-PASS: ol w/o explicit role and displayed inline, which defaults to no markers (NOT A LIST) -> group. 
-PASS: ul w/o explicit role and no markers (NOT A LIST) -> group. 
+PASS: ul w/ background image (NOT A LIST) -> . 
+PASS: ul w/ background on ::before (NOT A LIST) -> . 
+PASS: ul w/o explicit role and displayed inline, which defaults to no markers (NOT A LIST) -> . 
+PASS: ol w/o explicit role and displayed inline, which defaults to no markers (NOT A LIST) -> . 
+PASS: ul w/o explicit role and no markers (NOT A LIST) -> . 
 

Modified: trunk/LayoutTests/accessibility/list-detection2.html (214622 => 214623)


--- trunk/LayoutTests/accessibility/list-detection2.html	2017-03-30 21:10:54 UTC (rev 214622)
+++ trunk/LayoutTests/accessibility/list-detection2.html	2017-03-30 21:13:21 UTC (rev 214623)
@@ -118,12 +118,12 @@
 
 
     <h1>EXPLICIT FAILURE CASES: These next examples are <strong>NOT</strong> lists because these "list markers" are faked as background images. One is even a background image on a ::before pseudo-element, but that does not count as a listmarker. List markers should only be inferred by the <code>content</code> property or the <code>list-style</code> properties.</h1>
-    <ul data-role="group" class="ex nomarkers backgroundmarkers" data-note=" w/ background image (NOT A LIST)">
+    <ul data-role="" class="ex nomarkers backgroundmarkers" data-note=" w/ background image (NOT A LIST)">
         <li>foo</li>
         <li>bar</li>
         <li>baz</li>
     </ul>
-    <ul data-role="group" class="ex nomarkers backgroundmarkersbefore" data-note=" w/ background on ::before (NOT A LIST)">
+    <ul data-role="" class="ex nomarkers backgroundmarkersbefore" data-note=" w/ background on ::before (NOT A LIST)">
         <li>foo</li>
         <li>bar</li>
         <li>baz</li>
@@ -130,17 +130,17 @@
     </ul>
 
     <h1>EXPLICIT FAILURE CASES: These next examples are <strong>NOT</strong> there is no explicit role or any style or list markers to indicate this is actually intended as a list.</h1>
-    <ul data-role="group" class="ex inline" data-note=" w/o explicit role and displayed inline, which defaults to no markers (NOT A LIST)">
+    <ul data-role="" class="ex inline" data-note=" w/o explicit role and displayed inline, which defaults to no markers (NOT A LIST)">
         <li>foo</li>
         <li>bar</li>
         <li>baz</li>
     </ul>
-    <ol data-role="group" class="ex inline" data-note=" w/o explicit role and displayed inline, which defaults to no markers (NOT A LIST)">
+    <ol data-role="" class="ex inline" data-note=" w/o explicit role and displayed inline, which defaults to no markers (NOT A LIST)">
         <li>foo</li>
         <li>bar</li>
         <li>baz</li>
     </ol>
-    <ul data-role="group" class="ex nomarkers" data-note=" w/o explicit role and no markers (NOT A LIST)">
+    <ul data-role="" class="ex nomarkers" data-note=" w/o explicit role and no markers (NOT A LIST)">
         <li>foo</li>
         <li>bar</li>
         <li>baz</li>

Modified: trunk/LayoutTests/accessibility/roles-computedRoleString.html (214622 => 214623)


--- trunk/LayoutTests/accessibility/roles-computedRoleString.html	2017-03-30 21:10:54 UTC (rev 214622)
+++ trunk/LayoutTests/accessibility/roles-computedRoleString.html	2017-03-30 21:13:21 UTC (rev 214623)
@@ -70,7 +70,7 @@
 <!-- skipped <output> -->
 <p data-role="" class="ex">X</p>
 <!-- skipped <param> -->
-<pre data-role="group" class="ex">X</pre>
+<pre data-role="" class="ex">X</pre>
 <progress data-role="progressbar" class="ex" value="0.75">X</progress>
 <q data-role="" class="ex">X</q>
 <!-- skipped <ruby/rp/rt> -->
@@ -77,7 +77,7 @@
 <s data-role="" class="ex">X</s>
 <samp data-role="" class="ex">X</samp>
 <!-- skipped <script> -->
-<section data-role="group" class="ex" data-note=":not([aria-label]:not([aria-labelledby])">X</section>
+<section data-role="" class="ex" data-note=":not([aria-label]:not([aria-labelledby])">X</section>
 <section data-role="region" class="ex" aria-label="x" data-note="[aria-label]">X</section>
 <section data-role="region" class="ex" aria-labelledby="section-label" data-note="[aria-labelledby]">
     <h2 id="section-label">X</h2>

Modified: trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode-expected.txt (214622 => 214623)


--- trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode-expected.txt	2017-03-30 21:10:54 UTC (rev 214622)
+++ trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode-expected.txt	2017-03-30 21:13:21 UTC (rev 214623)
@@ -30,7 +30,7 @@
         </ul>
     exists: true
     label: 
-    role: group
+    role: 
     childNodeIds.length: 1
     parentNodeId: exists
 
@@ -968,7 +968,7 @@
 <script style="display:block;"></script>
     exists: true
     label: 
-    role: group
+    role: 
     ignored: true
     parentNodeId: exists
 

Modified: trunk/LayoutTests/inspector/dom/highlightFrame-expected.txt (214622 => 214623)


--- trunk/LayoutTests/inspector/dom/highlightFrame-expected.txt	2017-03-30 21:10:54 UTC (rev 214622)
+++ trunk/LayoutTests/inspector/dom/highlightFrame-expected.txt	2017-03-30 21:13:21 UTC (rev 214623)
@@ -11,10 +11,10 @@
 PASS: Should not be a highlight for the main frame.
 
 -- Running test case: HighlightChildFrame1
-Highlight Object: [{"scrollOffset":{"x":0,"y":0},"fragments":[{"quads":[[{"x":8,"y":50},{"x":312,"y":50},{"x":312,"y":204},{"x":8,"y":204}],[{"x":8,"y":50},{"x":312,"y":50},{"x":312,"y":204},{"x":8,"y":204}],[{"x":10,"y":52},{"x":310,"y":52},{"x":310,"y":202},{"x":10,"y":202}],[{"x":10,"y":52},{"x":310,"y":52},{"x":310,"y":202},{"x":10,"y":202}]],"contentColor":"rgba(0, 0, 0, 0)","contentOutlineColor":"rgba(0, 0, 0, 0)","paddingColor":"rgba(0, 0, 0, 0)","borderColor":"rgba(0, 0, 0, 0)","marginColor":"rgba(0
 , 0, 0, 
 0)"}],"elementData":{"tagName":"iframe","idValue":"frame-1","size":{"width":304,"height":154},"role":"group"}}]
+Highlight Object: [{"scrollOffset":{"x":0,"y":0},"fragments":[{"quads":[[{"x":8,"y":50},{"x":312,"y":50},{"x":312,"y":204},{"x":8,"y":204}],[{"x":8,"y":50},{"x":312,"y":50},{"x":312,"y":204},{"x":8,"y":204}],[{"x":10,"y":52},{"x":310,"y":52},{"x":310,"y":202},{"x":10,"y":202}],[{"x":10,"y":52},{"x":310,"y":52},{"x":310,"y":202},{"x":10,"y":202}]],"contentColor":"rgba(0, 0, 0, 0)","contentOutlineColor":"rgba(0, 0, 0, 0)","paddingColor":"rgba(0, 0, 0, 0)","borderColor":"rgba(0, 0, 0, 0)","marginColor":"rgba(0,
  0, 0, 0
 )"}],"elementData":{"tagName":"iframe","idValue":"frame-1","size":{"width":304,"height":154},"role":""}}]
 
 -- Running test case: HighlightChildFrame2
-Highlight Object: [{"scrollOffset":{"x":0,"y":0},"fragments":[{"quads":[[{"x":316,"y":50},{"x":620,"y":50},{"x":620,"y":204},{"x":316,"y":204}],[{"x":316,"y":50},{"x":620,"y":50},{"x":620,"y":204},{"x":316,"y":204}],[{"x":318,"y":52},{"x":618,"y":52},{"x":618,"y":202},{"x":318,"y":202}],[{"x":318,"y":52},{"x":618,"y":52},{"x":618,"y":202},{"x":318,"y":202}]],"contentColor":"rgba(0, 0, 0, 0)","contentOutlineColor":"rgba(0, 0, 0, 0)","paddingColor":"rgba(0, 0, 0, 0)","borderColor":"rgba(0, 0, 0, 0)","marginColor":
 "rg
 ba(0, 0, 0, 0)"}],"elementData":{"tagName":"iframe","idValue":"frame-2","size":{"width":304,"height":154},"role":"group"}}]
+Highlight Object: [{"scrollOffset":{"x":0,"y":0},"fragments":[{"quads":[[{"x":316,"y":50},{"x":620,"y":50},{"x":620,"y":204},{"x":316,"y":204}],[{"x":316,"y":50},{"x":620,"y":50},{"x":620,"y":204},{"x":316,"y":204}],[{"x":318,"y":52},{"x":618,"y":52},{"x":618,"y":202},{"x":318,"y":202}],[{"x":318,"y":52},{"x":618,"y":52},{"x":618,"y":202},{"x":318,"y":202}]],"contentColor":"rgba(0, 0, 0, 0)","contentOutlineColor":"rgba(0, 0, 0, 0)","paddingColor":"rgba(0, 0, 0, 0)","borderColor":"rgba(0, 0, 0, 0)","marginColor":&
 quot;rgb
 a(0, 0, 0, 0)"}],"elementData":{"tagName":"iframe","idValue":"frame-2","size":{"width":304,"height":154},"role":""}}]
 
 -- Running test case: BadFrameId
 PASS: Should produce an error.

Modified: trunk/LayoutTests/inspector/dom/highlightSelector-expected.txt (214622 => 214623)


--- trunk/LayoutTests/inspector/dom/highlightSelector-expected.txt	2017-03-30 21:10:54 UTC (rev 214622)
+++ trunk/LayoutTests/inspector/dom/highlightSelector-expected.txt	2017-03-30 21:13:21 UTC (rev 214623)
@@ -19,7 +19,7 @@
 PASS: Should highlight 2 element(s).
 Highlighted Elements:
 {"tagName":"div","idValue":"","classes":["class-one",".escaped"],"size":{"width":10,"height":20},"role":""}
-{"tagName":"iframe","idValue":"","classes":["class-one"],"size":{"width":304,"height":154},"role":"group"}
+{"tagName":"iframe","idValue":"","classes":["class-one"],"size":{"width":304,"height":154},"role":""}
 
 -- Running test case: MainFrameWithMultipleClassSelector
 - Frame: <main-frame>
@@ -42,7 +42,7 @@
 Highlighted Elements:
 {"tagName":"div","idValue":"","classes":["class-one",".escaped"],"size":{"width":10,"height":20},"role":""}
 {"tagName":"div","idValue":"id-one","classes":["class-two"],"size":{"width":100,"height":200},"role":""}
-{"tagName":"iframe","idValue":"","classes":["class-one"],"size":{"width":304,"height":154},"role":"group"}
+{"tagName":"iframe","idValue":"","classes":["class-one"],"size":{"width":304,"height":154},"role":""}
 
 -- Running test case: MissingOptionalFrameIdShouldUseMainFrame
 - Frame: Not Provided
@@ -49,7 +49,7 @@
 - Selector: iframe.class-one
 PASS: Should highlight 1 element(s).
 Highlighted Elements:
-{"tagName":"iframe","idValue":"","classes":["class-one"],"size":{"width":304,"height":154},"role":"group"}
+{"tagName":"iframe","idValue":"","classes":["class-one"],"size":{"width":304,"height":154},"role":""}
 
 -- Running test case: MainFrameNonMatchingSelector
 - Frame: <main-frame>

Modified: trunk/LayoutTests/platform/mac/accessibility/roles-computedRoleString-expected.txt (214622 => 214623)


--- trunk/LayoutTests/platform/mac/accessibility/roles-computedRoleString-expected.txt	2017-03-30 21:10:54 UTC (rev 214622)
+++ trunk/LayoutTests/platform/mac/accessibility/roles-computedRoleString-expected.txt	2017-03-30 21:13:21 UTC (rev 214623)
@@ -49,10 +49,10 @@
 PASS: ol -> list. 
 PASS: li -> listitem. 
 PASS: p -> . 
-PASS: pre -> group. 
+PASS: pre -> . 
 PASS: progress -> progressbar. 
 PASS: samp -> . 
-PASS: section:not([aria-label]:not([aria-labelledby]) -> group. 
+PASS: section:not([aria-label]:not([aria-labelledby]) -> . 
 PASS: section[aria-label] -> region. 
 PASS: section[aria-labelledby] -> region. 
 PASS: select:not([multiple]) -> button. 

Modified: trunk/LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt (214622 => 214623)


--- trunk/LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt	2017-03-30 21:10:54 UTC (rev 214622)
+++ trunk/LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt	2017-03-30 21:13:21 UTC (rev 214623)
@@ -901,7 +901,7 @@
       
 div[role=doc-biblioentry]
       AXRole: AXGroup
-      AXSubrole: 
+      AXSubrole: AXApplicationGroup
       AXRoleDescription: group
       
 div[role=doc-bibliography]
@@ -921,7 +921,7 @@
       
 div[role=doc-colophon]
       AXRole: AXGroup
-      AXSubrole: 
+      AXSubrole: AXApplicationGroup
       AXRoleDescription: group
       
 div[role=doc-conclusion]
@@ -936,7 +936,7 @@
       
 div[role=doc-credit]
       AXRole: AXGroup
-      AXSubrole: 
+      AXSubrole: AXApplicationGroup
       AXRoleDescription: group
       
 div[role=doc-credits]
@@ -946,12 +946,12 @@
       
 div[role=doc-dedication]
       AXRole: AXGroup
-      AXSubrole: 
+      AXSubrole: AXApplicationGroup
       AXRoleDescription: group
       
 div[role=doc-endnote]
       AXRole: AXGroup
-      AXSubrole: 
+      AXSubrole: AXApplicationGroup
       AXRoleDescription: group
       
 div[role=doc-endnotes]
@@ -961,7 +961,7 @@
       
 div[role=doc-epigraph]
       AXRole: AXGroup
-      AXSubrole: 
+      AXSubrole: AXApplicationGroup
       AXRoleDescription: group
       
 div[role=doc-epilogue]
@@ -976,12 +976,12 @@
       
 div[role=doc-example]
       AXRole: AXGroup
-      AXSubrole: 
+      AXSubrole: AXApplicationGroup
       AXRoleDescription: group
       
 div[role=doc-footnote]
       AXRole: AXGroup
-      AXSubrole: 
+      AXSubrole: AXApplicationGroup
       AXRoleDescription: group
       
 div[role=doc-foreword]
@@ -1016,12 +1016,12 @@
       
 div[role=doc-notice]
       AXRole: AXGroup
-      AXSubrole: 
+      AXSubrole: AXApplicationGroup
       AXRoleDescription: group
       
 div[role=doc-pagebreak]
       AXRole: AXGroup
-      AXSubrole: 
+      AXSubrole: AXApplicationGroup
       AXRoleDescription: group
       
 div[role=doc-pagelist]
@@ -1046,12 +1046,12 @@
       
 div[role=doc-pullquote]
       AXRole: AXGroup
-      AXSubrole: 
+      AXSubrole: AXApplicationGroup
       AXRoleDescription: group
       
 div[role=doc-qna]
       AXRole: AXGroup
-      AXSubrole: 
+      AXSubrole: AXApplicationGroup
       AXRoleDescription: group
       
 div[role=doc-subtitle]
@@ -1061,7 +1061,7 @@
       
 div[role=doc-tip]
       AXRole: AXGroup
-      AXSubrole: 
+      AXSubrole: AXApplicationGroup
       AXRoleDescription: group
       
 div[role=doc-toc]
@@ -1111,7 +1111,7 @@
       
 div[role=group]
       AXRole: AXGroup
-      AXSubrole: 
+      AXSubrole: AXApplicationGroup
       AXRoleDescription: group
       
 div[role=heading]

Modified: trunk/Source/WebCore/ChangeLog (214622 => 214623)


--- trunk/Source/WebCore/ChangeLog	2017-03-30 21:10:54 UTC (rev 214622)
+++ trunk/Source/WebCore/ChangeLog	2017-03-30 21:13:21 UTC (rev 214623)
@@ -1,3 +1,42 @@
+2017-03-30  James Craig  <jcr...@apple.com>
+
+        AX: Expose a new AXSubrole for explicit ARIA "group" role
+        https://bugs.webkit.org/show_bug.cgi?id=169810
+        <rdar://problem/31039693>
+
+        Reviewed by Chris Fleizach.
+
+        Split GroupRole into generics (GroupRole) and explicit groups 
+        (ApplicationGroupRole) so we can expose a subrole on the explicit 
+        groups. Account for the change in ARIA Tree and Menu hierachies. 
+        Update the computedRoleValue for WebKit Inspector usage, too.
+
+        Updated existing tests.
+
+        Test: accessibility/list-detection2.html:
+        Test: accessibility/roles-computedRoleString.html:
+        Test: inspector/dom/getAccessibilityPropertiesForNode.html:
+        Test: inspector/dom/highlightFrame.html:
+        Test: inspector/dom/highlightSelector.html:
+
+        * accessibility/AccessibilityNodeObject.cpp:
+        (WebCore::AccessibilityNodeObject::helpText):
+        (WebCore::AccessibilityNodeObject::hierarchicalLevel):
+        (WebCore::AccessibilityNodeObject::remapAriaRoleDueToParent):
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::accessibleNameDerivesFromContent):
+        (WebCore::AccessibilityObject::ariaTreeItemContent):
+        (WebCore::initializeRoleMap):
+        (WebCore::AccessibilityObject::computedRoleString):
+        * accessibility/AccessibilityObject.h:
+        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
+        (atkRole):
+        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+        (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (createAccessibilityRoleMap):
+        (-[WebAccessibilityObjectWrapper subrole]):
+
 2017-03-30  Chris Dumez  <cdu...@apple.com>
 
         We are spending a lot of time bzero'ing AudioChannel buffers on uni-watch.com

Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (214622 => 214623)


--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp	2017-03-30 21:10:54 UTC (rev 214622)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp	2017-03-30 21:13:21 UTC (rev 214623)
@@ -1606,7 +1606,7 @@
         AccessibilityObject* axObj = axObjectCache()->getOrCreate(ancestor);
         if (axObj) {
             AccessibilityRole role = axObj->roleValue();
-            if (role != GroupRole && role != UnknownRole)
+            if (role != ApplicationGroupRole && role != GroupRole && role != UnknownRole)
                 break;
         }
     }
@@ -1633,7 +1633,7 @@
     unsigned level = 1;
     for (AccessibilityObject* parent = parentObject(); parent; parent = parent->parentObject()) {
         AccessibilityRole parentRole = parent->ariaRoleAttribute();
-        if (parentRole == GroupRole)
+        if (parentRole == ApplicationGroupRole)
             level++;
         else if (parentRole == TreeRole)
             break;
@@ -2150,7 +2150,7 @@
         if (role == ListBoxOptionRole && parentAriaRole == MenuRole)
             return MenuItemRole;
         // An aria "menuitem" may map to MenuButton or MenuItem depending on its parent.
-        if (role == MenuItemRole && parentAriaRole == GroupRole)
+        if (role == MenuItemRole && parentAriaRole == ApplicationGroupRole)
             return MenuButtonRole;
         
         // If the parent had a different role, then we don't need to continue searching up the chain.

Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (214622 => 214623)


--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp	2017-03-30 21:10:54 UTC (rev 214622)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp	2017-03-30 21:13:21 UTC (rev 214623)
@@ -300,6 +300,7 @@
     case ApplicationAlertRole:
     case ApplicationAlertDialogRole:
     case ApplicationDialogRole:
+    case ApplicationGroupRole:
     case ApplicationLogRole:
     case ApplicationMarqueeRole:
     case ApplicationStatusRole:
@@ -1829,7 +1830,7 @@
     // The ARIA tree item content are the item that are not other tree items or their containing groups.
     for (const auto& child : children()) {
         AccessibilityRole role = child->roleValue();
-        if (role == TreeItemRole || role == GroupRole)
+        if (role == TreeItemRole || role == GroupRole || role == ApplicationGroupRole)
             continue;
         
         result.append(child);
@@ -2110,23 +2111,23 @@
         { "doc-afterword", LandmarkRegionRole },
         { "doc-appendix", LandmarkRegionRole },
         { "doc-backlink", WebCoreLinkRole },
-        { "doc-biblioentry", GroupRole },
+        { "doc-biblioentry", ApplicationGroupRole },
         { "doc-bibliography", LandmarkRegionRole },
         { "doc-biblioref", WebCoreLinkRole },
         { "doc-chapter", LandmarkRegionRole },
-        { "doc-colophon", GroupRole },
+        { "doc-colophon", ApplicationGroupRole },
         { "doc-conclusion", LandmarkRegionRole },
         { "doc-cover", ImageRole },
-        { "doc-credit", GroupRole },
+        { "doc-credit", ApplicationGroupRole },
         { "doc-credits", LandmarkRegionRole },
-        { "doc-dedication", GroupRole },
-        { "doc-endnote", GroupRole },
+        { "doc-dedication", ApplicationGroupRole },
+        { "doc-endnote", ApplicationGroupRole },
         { "doc-endnotes", LandmarkRegionRole },
-        { "doc-epigraph", GroupRole },
+        { "doc-epigraph", ApplicationGroupRole },
         { "doc-epilogue", LandmarkRegionRole },
         { "doc-errata", LandmarkRegionRole },
-        { "doc-example", GroupRole },
-        { "doc-footnote", GroupRole },
+        { "doc-example", ApplicationGroupRole },
+        { "doc-footnote", ApplicationGroupRole },
         { "doc-foreword", LandmarkRegionRole },
         { "doc-glossary", LandmarkRegionRole },
         { "doc-glossref", WebCoreLinkRole },
@@ -2133,16 +2134,16 @@
         { "doc-index", LandmarkNavigationRole },
         { "doc-introduction", LandmarkRegionRole },
         { "doc-noteref", WebCoreLinkRole },
-        { "doc-notice", GroupRole },
-        { "doc-pagebreak", GroupRole },
+        { "doc-notice", ApplicationGroupRole },
+        { "doc-pagebreak", ApplicationGroupRole },
         { "doc-pagelist", LandmarkNavigationRole },
         { "doc-part", LandmarkRegionRole },
         { "doc-preface", LandmarkRegionRole },
         { "doc-prologue", LandmarkRegionRole },
-        { "doc-pullquote", GroupRole },
-        { "doc-qna", GroupRole },
+        { "doc-pullquote", ApplicationGroupRole },
+        { "doc-qna", ApplicationGroupRole },
         { "doc-subtitle", HeadingRole },
-        { "doc-tip", GroupRole },
+        { "doc-tip", ApplicationGroupRole },
         { "doc-toc", LandmarkNavigationRole },
         { "grid", GridRole },
         { "gridcell", GridCellRole },
@@ -2154,7 +2155,7 @@
         { "document", DocumentRole },
         { "form", FormRole },
         { "rowheader", RowHeaderRole },
-        { "group", GroupRole },
+        { "group", ApplicationGroupRole },
         { "heading", HeadingRole },
         { "img", ImageRole },
         { "link", WebCoreLinkRole },
@@ -2244,6 +2245,8 @@
 {
     // FIXME: Need a few special cases that aren't in the RoleMap: option, etc. http://webkit.org/b/128296
     AccessibilityRole role = roleValue();
+    if (role == GroupRole)
+        return ""; // Special-casing an empty value because generic block elements (GroupRole) are not the same as role="group" (ApplicationGroupRole).
     if (role == HorizontalRuleRole)
         role = SplitterRole;
     if (role == PopUpButtonRole || role == ToggleButtonRole)

Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (214622 => 214623)


--- trunk/Source/WebCore/accessibility/AccessibilityObject.h	2017-03-30 21:10:54 UTC (rev 214622)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h	2017-03-30 21:13:21 UTC (rev 214623)
@@ -95,6 +95,7 @@
     ApplicationAlertRole,
     ApplicationAlertDialogRole,
     ApplicationDialogRole,
+    ApplicationGroupRole,
     ApplicationLogRole,
     ApplicationMarqueeRole,
     ApplicationStatusRole,

Modified: trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp (214622 => 214623)


--- trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp	2017-03-30 21:10:54 UTC (rev 214622)
+++ trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp	2017-03-30 21:13:21 UTC (rev 214623)
@@ -548,6 +548,7 @@
     case SVGRootRole:
     case TabPanelRole:
         return ATK_ROLE_PANEL;
+    case ApplicationGroupRole:
     case GroupRole:
         return coreObject->isStyleFormatGroup() ? ATK_ROLE_SECTION : ATK_ROLE_PANEL;
     case RowHeaderRole:

Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (214622 => 214623)


--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm	2017-03-30 21:10:54 UTC (rev 214622)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm	2017-03-30 21:13:21 UTC (rev 214623)
@@ -833,6 +833,7 @@
         case ApplicationAlertRole:
         case ApplicationAlertDialogRole:
         case ApplicationDialogRole:
+        case ApplicationGroupRole:
         case ApplicationLogRole:
         case ApplicationMarqueeRole:
         case ApplicationStatusRole:

Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (214622 => 214623)


--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2017-03-30 21:10:54 UTC (rev 214622)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2017-03-30 21:13:21 UTC (rev 214623)
@@ -1866,6 +1866,7 @@
         { ApplicationAlertRole, NSAccessibilityGroupRole },
         { ApplicationAlertDialogRole, NSAccessibilityGroupRole },
         { ApplicationDialogRole, NSAccessibilityGroupRole },
+        { ApplicationGroupRole, NSAccessibilityGroupRole },
         { ApplicationLogRole, NSAccessibilityGroupRole },
         { ApplicationMarqueeRole, NSAccessibilityGroupRole },
         { ApplicationStatusRole, NSAccessibilityGroupRole },
@@ -2023,6 +2024,8 @@
             return @"AXApplicationAlertDialog";
         case ApplicationDialogRole:
             return @"AXApplicationDialog";
+        case ApplicationGroupRole:
+            return @"AXApplicationGroup";
         case ApplicationLogRole:
             return @"AXApplicationLog";
         case ApplicationMarqueeRole:

Modified: trunk/Source/WebKit/win/AccessibleBase.cpp (214622 => 214623)


--- trunk/Source/WebKit/win/AccessibleBase.cpp	2017-03-30 21:10:54 UTC (rev 214622)
+++ trunk/Source/WebKit/win/AccessibleBase.cpp	2017-03-30 21:13:21 UTC (rev 214623)
@@ -887,6 +887,7 @@
             return ROLE_SYSTEM_COLUMN;
         case WebCore::RowRole:
             return ROLE_SYSTEM_ROW;
+        case WebCore::ApplicationGroupRole:
         case WebCore::GroupRole:
         case WebCore::RadioGroupRole:
             return ROLE_SYSTEM_GROUPING;

Modified: trunk/Source/WebKit/win/ChangeLog (214622 => 214623)


--- trunk/Source/WebKit/win/ChangeLog	2017-03-30 21:10:54 UTC (rev 214622)
+++ trunk/Source/WebKit/win/ChangeLog	2017-03-30 21:13:21 UTC (rev 214623)
@@ -1,3 +1,16 @@
+2017-03-30  James Craig  <jcr...@apple.com>
+
+        AX: Expose a new AXSubrole for explicit ARIA "group" role
+        https://bugs.webkit.org/show_bug.cgi?id=169810
+        <rdar://problem/31039693>
+
+        Reviewed by Chris Fleizach.
+
+        Account for Windows platform role mapping.
+
+        * AccessibleBase.cpp:
+        (MSAARole):
+
 2017-03-24  Wenson Hsieh  <wenson_hs...@apple.com>
 
         [WK2] Add a UI delegate SPI hook to enable or disable navigation on drop
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to