AX: Implement support for ARIA roles insertion, deletion, subscript, superscript...
authorjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Jul 2019 13:36:50 +0000 (13:36 +0000)
committerjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Jul 2019 13:36:50 +0000 (13:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=199692

Reviewed by Chris Fleizach.

Source/WebCore:

Create new AccessibilityRole types which correspond to the new ARIA roles and
update AccessibilityRenderObject::determineAccessibilityRole() to assign these
internal roles to the related HTML elements.

Update both ATK and Mac to recognize these new internal roles. In addition, update
the ATK mappings for the ins and del elements to ATK_ROLE_CONTENT_INSERTION and
ATK_ROLE_CONTENT_DELETION respectively. Also expose "insertion" and "deletion" via
the AtkObject xml-roles attribute so that this information is not completely absent
for GTK or WPE built against earlier versions of ATK.

Remove AccessibilityObject's isSubscriptStyleGroup() and isSuperscriptStyleGroup().
These two methods were only being used by ATK and are no longer needed for platform
role mapping.

No new tests. Instead add the roles to the existing role-exposure tests.

* accessibility/AccessibilityObject.cpp:
(WebCore::initializeRoleMap):
(WebCore::AccessibilityObject::isSubscriptStyleGroup const): Deleted.
(WebCore::AccessibilityObject::isSuperscriptStyleGroup const): Deleted.
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityObjectInterface.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/atk/WebKitAccessible.cpp:
(webkitAccessibleGetAttributes):
(atkRole):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper subrole]):

Tools:

Add support for output of AXDeletion and AXInsertion roles for tests.
Update GTK and WPE jhbuild modules to use version of ATK and AT-SPI2
which include ROLE_CONTENT_DELETION and ROLE_CONTENT_INSERTION.

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
* gtk/jhbuild.modules:
* wpe/jhbuild.modules:

LayoutTests:

Add the new roles to the existing role-exposure tests and update expectations accordingly.

* accessibility/gtk/object-attributes-expected.txt:
* accessibility/gtk/object-attributes.html:
* accessibility/gtk/xml-roles-exposed-expected.txt:
* accessibility/gtk/xml-roles-exposed.html:
* accessibility/roles-computedRoleString.html:
* accessibility/roles-exposed.html:
* platform/gtk/accessibility/roles-computedRoleString-expected.txt:
* platform/gtk/accessibility/roles-exposed-expected.txt:
* platform/mac-wk2/accessibility/roles-exposed-expected.txt:
* platform/mac/accessibility/roles-computedRoleString-expected.txt:
* platform/mac/accessibility/roles-exposed-expected.txt:
* platform/wpe/accessibility/roles-computedRoleString-expected.txt:
* platform/wpe/accessibility/roles-exposed-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247349 268f45cc-cd09-0410-ab3c-d52691b4dbfc

26 files changed:
LayoutTests/ChangeLog
LayoutTests/accessibility/gtk/object-attributes-expected.txt
LayoutTests/accessibility/gtk/object-attributes.html
LayoutTests/accessibility/gtk/xml-roles-exposed-expected.txt
LayoutTests/accessibility/gtk/xml-roles-exposed.html
LayoutTests/accessibility/roles-computedRoleString.html
LayoutTests/accessibility/roles-exposed.html
LayoutTests/platform/gtk/accessibility/roles-computedRoleString-expected.txt
LayoutTests/platform/gtk/accessibility/roles-exposed-expected.txt
LayoutTests/platform/mac-wk2/accessibility/roles-exposed-expected.txt
LayoutTests/platform/mac/accessibility/roles-computedRoleString-expected.txt
LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt
LayoutTests/platform/wpe/accessibility/roles-computedRoleString-expected.txt
LayoutTests/platform/wpe/accessibility/roles-exposed-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityObjectInterface.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/atk/WebKitAccessible.cpp
Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp
Tools/gtk/jhbuild.modules
Tools/wpe/jhbuild.modules

index 85b07a3..62ccbe9 100644 (file)
@@ -1,3 +1,26 @@
+2019-07-11  Joanmarie Diggs  <jdiggs@igalia.com>
+
+        AX: Implement support for ARIA roles insertion, deletion, subscript, superscript, and time
+        https://bugs.webkit.org/show_bug.cgi?id=199692
+
+        Reviewed by Chris Fleizach.
+
+        Add the new roles to the existing role-exposure tests and update expectations accordingly.
+
+        * accessibility/gtk/object-attributes-expected.txt:
+        * accessibility/gtk/object-attributes.html:
+        * accessibility/gtk/xml-roles-exposed-expected.txt:
+        * accessibility/gtk/xml-roles-exposed.html:
+        * accessibility/roles-computedRoleString.html:
+        * accessibility/roles-exposed.html:
+        * platform/gtk/accessibility/roles-computedRoleString-expected.txt:
+        * platform/gtk/accessibility/roles-exposed-expected.txt:
+        * platform/mac-wk2/accessibility/roles-exposed-expected.txt:
+        * platform/mac/accessibility/roles-computedRoleString-expected.txt:
+        * platform/mac/accessibility/roles-exposed-expected.txt:
+        * platform/wpe/accessibility/roles-computedRoleString-expected.txt:
+        * platform/wpe/accessibility/roles-exposed-expected.txt:
+
 2019-07-10  Saam Barati  <sbarati@apple.com>
 
         [WHLSL] Import all tests that pass without compiler changes from the JS reference test suite
index 868c825..e7d70d8 100644 (file)
@@ -21,6 +21,9 @@ Odd   Even
 
 4
 
+foo
+bar
+baz
 This tests the exposure of Atk object attributes.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
@@ -215,10 +218,67 @@ AXRequired: 0
 AXChecked: 0
 AXPlatformAttributes: computed-role:table, tag:table, toolkit:WebKitGtk
 ------------
+AXRole: AXDeletion
+AXParent: AXWebArea
+AXChildren: 0
+AXPosition:  { 8.00000, 392.000 }
+AXSize: { 784.000, 19.0000 }
+AXTitle: 
+AXDescription: 
+AXValue: foo
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: xml-roles:deletion, computed-role:deletion, tag:del, toolkit:WebKitGtk
+------------
+AXRole: AXInsertion
+AXParent: AXWebArea
+AXChildren: 0
+AXPosition:  { 8.00000, 410.000 }
+AXSize: { 784.000, 19.0000 }
+AXTitle: 
+AXDescription: 
+AXValue: bar
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: xml-roles:insertion, computed-role:insertion, tag:ins, toolkit:WebKitGtk
+------------
+AXRole: AXStatic
+AXParent: AXWebArea
+AXChildren: 0
+AXPosition:  { 8.00000, 428.000 }
+AXSize: { 784.000, 19.0000 }
+AXTitle: 
+AXDescription: 
+AXValue: baz
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: computed-role:time, tag:time, toolkit:WebKitGtk
+------------
 AXRole: AXParagraph
 AXParent: AXWebArea
 AXChildren: 2
-AXPosition:  { 8.00000, 408.000 }
+AXPosition:  { 8.00000, 462.000 }
 AXSize: { 784.000, 53.0000 }
 AXTitle: 
 AXDescription: 
index ea4e50d..bd669d0 100644 (file)
@@ -20,6 +20,9 @@
 <tr><td><p>1</p></td><td><p>2</p></td></tr>
 <tr><td><p>3</p></td><td><p>4</p></td></tr>
 </table>
+<del style="display:block;">foo</del>
+<ins style="display:block;">bar</ins>
+<time style="display:block;">baz</time>
 <p id="description"></p>
 <div id="console"></div>
 <script>
index 6c2f7ff..6df3e97 100644 (file)
@@ -250,6 +250,25 @@ AXRequired: 0
 AXChecked: 0
 AXPlatformAttributes: computed-role:definition, xml-roles:definition, tag:div, toolkit:WebKitGtk
 ------------
+AXRole: AXDeletion
+AXParent: AXWebArea
+AXChildren: 0
+AXPosition:  { 0.00000, 0.00000 }
+AXSize: { 0.00000, 0.00000 }
+AXTitle: 
+AXDescription: 
+AXValue: 
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: computed-role:deletion, xml-roles:deletion, tag:div, toolkit:WebKitGtk
+------------
 AXRole: AXDialog
 AXParent: AXWebArea
 AXChildren: 0
@@ -421,6 +440,25 @@ AXRequired: 0
 AXChecked: 0
 AXPlatformAttributes: computed-role:img, xml-roles:img, tag:div, toolkit:WebKitGtk
 ------------
+AXRole: AXInsertion
+AXParent: AXWebArea
+AXChildren: 0
+AXPosition:  { 0.00000, 0.00000 }
+AXSize: { 0.00000, 0.00000 }
+AXTitle: 
+AXDescription: 
+AXValue: 
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: computed-role:insertion, xml-roles:insertion, tag:div, toolkit:WebKitGtk
+------------
 AXRole: AXLink
 AXParent: AXWebArea
 AXChildren: 0
@@ -802,6 +840,44 @@ AXRequired: 0
 AXChecked: 0
 AXPlatformAttributes: atomic:true, relevant:additions text, live:polite, container-live-role:status, container-atomic:true, container-relevant:additions text, container-live:polite, computed-role:status, xml-roles:status, tag:div, toolkit:WebKitGtk
 ------------
+AXRole: AXSubscript
+AXParent: AXWebArea
+AXChildren: 0
+AXPosition:  { 0.00000, 0.00000 }
+AXSize: { 0.00000, 0.00000 }
+AXTitle: 
+AXDescription: 
+AXValue: 
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: computed-role:subscript, xml-roles:subscript, tag:div, toolkit:WebKitGtk
+------------
+AXRole: AXSuperscript
+AXParent: AXWebArea
+AXChildren: 0
+AXPosition:  { 0.00000, 0.00000 }
+AXSize: { 0.00000, 0.00000 }
+AXTitle: 
+AXDescription: 
+AXValue: 
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: computed-role:superscript, xml-roles:superscript, tag:div, toolkit:WebKitGtk
+------------
 AXRole: AXToggleButton
 AXParent: AXWebArea
 AXChildren: 0
@@ -859,6 +935,25 @@ AXRequired: 0
 AXChecked: 0
 AXPlatformAttributes: xml-roles:textbox, readonly:false, tag:div, toolkit:WebKitGtk
 ------------
+AXRole: AXStatic
+AXParent: AXWebArea
+AXChildren: 0
+AXPosition:  { 0.00000, 0.00000 }
+AXSize: { 0.00000, 0.00000 }
+AXTitle: 
+AXDescription: 
+AXValue: 
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: computed-role:time, xml-roles:time, tag:div, toolkit:WebKitGtk
+------------
 AXRole: AXTimer
 AXParent: AXWebArea
 AXChildren: 0
index 74ad2ff..d6b9f6b 100644 (file)
@@ -18,6 +18,7 @@
  <div role="complementary"></div>
  <div role="contentinfo"></div>
  <div role="definition"></div>
+ <div role="deletion"></div>
  <div role="dialog"></div>
  <div role="directory"></div>
  <div role="document"></div>
@@ -27,6 +28,7 @@
  <div role="group"></div>
  <div role="heading"></div>
  <div role="img"></div>
+ <div role="insertion"></div>
  <div role="link"></div>
  <div role="log"></div>
  <div role="main"></div>
  <div role="slider"></div>
  <div role="spinbutton"></div>
  <div role="status"></div>
+ <div role="subscript"></div>
+ <div role="superscript"></div>
  <div role="switch"></div>
  <div role="term"></div>
  <div role="textbox"></div>
+ <div role="time"></div>
  <div role="timer"></div>
  <div role="toolbar"></div>
  <div role="tooltip"></div>
index fe97f8f..92a6082 100644 (file)
@@ -12,6 +12,7 @@
 <article data-role="article" data-platform="atk,mac" class="ex">X</article>
 <aside data-role="complementary" data-platform="atk,mac" class="ex">X</aside>
 <button data-role="button" data-platform="atk,mac" class="ex">X</button>
+<del data-role="deletion" data-platform="atk,mac" class="ex">X</ins>
 <dfn data-role="definition" data-platform="atk,mac" class="ex">X</dfn>
 <dl data-role="" data-platform="atk,mac" class="ex">
     <dt>X</dt>
@@ -53,7 +54,7 @@
 <input type="time" value="X" data-role="" data-platform="atk,mac" class="ex" data-note="[type='time']">
 <input type="url" value="X" data-role="" data-platform="atk,mac" class="ex" data-note="[type='url']">
 <input type="week" value="X" data-role="" data-platform="atk,mac" class="ex" data-note="[type='week']">
-<ins data-role="" data-platform="atk,mac" class="ex">X</ins>
+<ins data-role="insertion" data-platform="atk,mac" class="ex">X</ins>
 <mark data-role="" data-platform="atk,mac" class="ex">X</mark>
 <math data-role="math" data-platform="atk,mac" class="ex">X</math>
 <!-- skipped <menu> -->
@@ -98,8 +99,8 @@
 <small data-role="" data-platform="atk,mac" class="ex">X</small>
 <span data-role="" data-platform="atk,mac" class="ex">X</span>
 <strong data-role="" data-platform="atk,mac" class="ex">X</strong>
-<sub data-role="" data-platform="atk,mac" class="ex">X</sub>
-<sup data-role="" data-platform="atk,mac" class="ex">X</sup>
+<sub data-role="subscript" data-platform="atk,mac" class="ex">X</sub>
+<sup data-role="superscript" data-platform="atk,mac" class="ex">X</sup>
 <svg data-role="" data-platform="atk,mac" class="ex">X</svg>
 
 <table data-role="table" data-platform="atk,mac" class="ex">
 </table>
 
 <textarea data-role="textbox" data-platform="atk,mac" class="ex">X</textarea>
-<time data-role="" data-platform="atk,mac" class="ex">X</time>
+<time data-role="time" data-platform="atk,mac" class="ex">X</time>
 <ul data-role="list" data-platform="atk,mac" class="ex">
     <li data-role="listitem" data-platform="atk,mac" class="ex">X</li>
 </ul>
 <div role="complementary"            data-role="complementary" data-platform="atk,mac" class="ex">X</div>
 <div role="contentinfo"              data-role="contentinfo" data-platform="atk,mac" class="ex">X</div>
 <div role="definition"               data-role="definition" data-platform="atk,mac" class="ex">X</div>
+<div role="deletion"                 data-role="deletion" data-platform="atk,mac" class="ex">X</div>
 <div role="dialog"                   data-role="dialog" data-platform="atk,mac" class="ex">X</div>
 <div role="directory"                data-role="list" data-platform="atk,mac" class="ex">X</div><!-- FIXME: should be directory -->
 <div role="document"                 data-role="document" data-platform="atk,mac" class="ex">X</div>
 <div role="group"                    data-role="group" data-platform="atk,mac" class="ex">X</div>
 <div role="heading"                  data-role="heading" data-platform="atk,mac" class="ex">X</div>
 <div role="img"                      data-role="img" data-platform="atk,mac" class="ex">X</div>
+<div role="insertion"                data-role="insertion" data-platform="atk,mac" class="ex">X</div>
 <div role="link"                     data-role="link" data-platform="atk,mac" class="ex">X</div>
 <div role="list"                     data-role="list" data-platform="atk,mac" class="ex">
     <div role="listitem"             data-role="listitem" data-platform="atk,mac" class="ex">X</div>
 <div role="slider"                   data-role="slider" data-platform="atk,mac" class="ex">X</div>
 <div role="spinbutton"               data-role="spinbutton" data-platform="atk,mac" class="ex">X</div>
 <div role="status"                   data-role="status" data-platform="atk,mac" class="ex">X</div>
+<div role="subscript"                data-role="subscript" data-platform="atk,mac" class="ex">X</div>
+<div role="superscript"              data-role="superscript" data-platform="atk,mac" class="ex">X</div>
 <div role="tablist"                  data-role="tablist" data-platform="atk,mac" class="ex">
     <div role="tab"                  data-role="tab" data-platform="atk,mac" class="ex">X</div>
 </div>
 <div role="tabpanel"                 data-role="tabpanel" data-platform="atk,mac" class="ex">X</div>
 <div role="textbox"                  data-role="" data-platform="atk,mac" class="ex">X</div><!-- FIXME: should be textbox -->
 <div role="term"                     data-role="term" data-platform="atk,mac" class="ex">X</div>
+<div role="time"                     data-role="time" data-platform="atk,mac" class="ex">X</div>
 <div role="timer"                    data-role="timer" data-platform="atk,mac" class="ex">X</div>
 <div role="toolbar"                  data-role="toolbar" data-platform="atk,mac" class="ex">X</div>
 <div role="tooltip"                  data-role="tooltip" data-platform="atk,mac" class="ex">X</div>
index d5751e9..9de2612 100644 (file)
 <div role="complementary"            data-platform="atk,mac" class="ex">X</div>
 <div role="contentinfo"              data-platform="atk,mac" class="ex">X</div>
 <div role="definition"               data-platform="atk,mac" class="ex">X</div>
+<div role="deletion"                 data-platform="atk,mac" class="ex">X</div>
 <div role="dialog"                   data-platform="atk,mac" class="ex">X</div>
 <div role="directory"                data-platform="atk,mac" class="ex">X</div>
 <!-- The 'doc-*' roles are defined the ARIA DPUB mobile: https://www.w3.org/TR/dpub-aam-1.0/ -->
 <div role="group"                    data-platform="atk,mac" class="ex">X</div>
 <div role="heading"                  data-platform="atk,mac" class="ex">X</div>
 <div role="img"                      data-platform="atk,mac" class="ex">X</div>
+<div role="insertion"                data-platform="atk,mac" class="ex">X</div>
 <div role="link"                     data-platform="atk,mac" class="ex">X</div>
 <div role="list"                     data-platform="atk,mac" class="ex">
     <div role="listitem"             data-platform="atk,mac" class="ex">X</div>
 <div role="slider"                   data-platform="atk,mac" class="ex">X</div>
 <div role="spinbutton"               data-platform="atk,mac" class="ex">X</div>
 <div role="status"                   data-platform="atk,mac" class="ex">X</div>
+<div role="subscript"                data-platform="atk,mac" class="ex">X</div>
+<div role="superscript"              data-platform="atk,mac" class="ex">X</div>
 <div role="switch"                   data-platform="atk,mac" class="ex">X</div>
 <div role="tablist"                  data-platform="atk,mac" class="ex">
     <div role="tab"                  data-platform="atk,mac" class="ex">X</div>
 <div role="tabpanel"                 data-platform="atk,mac" class="ex">X</div>
 <div role="term"                     data-platform="atk,mac" class="ex">X</div>
 <div role="textbox"                  data-platform="atk,mac" class="ex">X</div>
+<div role="time"                     data-platform="atk,mac" class="ex">X</div>
 <div role="timer"                    data-platform="atk,mac" class="ex">X</div>
 <div role="toolbar"                  data-platform="atk,mac" class="ex">X</div>
 <div role="tooltip"                  data-platform="atk,mac" class="ex">X</div>
index d36d08d..4c53eca 100644 (file)
@@ -7,6 +7,7 @@ PASS: a[href] -> link.
 PASS: article -> article. 
 PASS: aside -> complementary. 
 PASS: button -> button. 
+PASS: del -> deletion. 
 PASS: dfn -> definition. 
 PASS: dl -> . 
 PASS: footer -> contentinfo. 
@@ -41,7 +42,7 @@ PASS: input[type='text'] -> .
 PASS: input[type='time'] -> . 
 PASS: input[type='url'] -> . 
 PASS: input[type='week'] -> . 
-PASS: ins -> . 
+PASS: ins -> insertion
 PASS: math -> math. 
 PASS: nav -> navigation. 
 PASS: ol -> list. 
@@ -61,8 +62,8 @@ PASS: option -> option.
 PASS: optgroup -> option. 
 PASS: option -> option. 
 PASS: option -> option. 
-PASS: sub -> . 
-PASS: sup -> . 
+PASS: sub -> subscript
+PASS: sup -> superscript
 PASS: table -> table. 
 PASS: caption -> caption. 
 PASS: tr -> row. 
@@ -79,7 +80,7 @@ PASS: td[role="gridcell"] -> gridcell.
 PASS: tr -> row. 
 PASS: td[role="gridcell"] -> gridcell. 
 PASS: textarea -> textbox. 
-PASS: time -> . 
+PASS: time -> time
 PASS: ul -> list. 
 PASS: li -> listitem. 
 PASS: var -> . 
@@ -108,6 +109,7 @@ PASS: div[role="combobox"] -> combobox.
 PASS: div[role="complementary"] -> complementary. 
 PASS: div[role="contentinfo"] -> contentinfo. 
 PASS: div[role="definition"] -> definition. 
+PASS: div[role="deletion"] -> deletion. 
 PASS: div[role="dialog"] -> dialog. 
 PASS: div[role="directory"] -> list. 
 PASS: div[role="document"] -> document. 
@@ -125,6 +127,7 @@ PASS: div[role="feed"] -> feed.
 PASS: div[role="group"] -> group. 
 PASS: div[role="heading"] -> heading. 
 PASS: div[role="img"] -> img. 
+PASS: div[role="insertion"] -> insertion. 
 PASS: div[role="link"] -> link. 
 PASS: div[role="list"] -> list. 
 PASS: div[role="listitem"] -> listitem. 
@@ -158,11 +161,14 @@ PASS: div[role="separator"] -> separator.
 PASS: div[role="slider"] -> slider. 
 PASS: div[role="spinbutton"] -> spinbutton. 
 PASS: div[role="status"] -> status. 
+PASS: div[role="subscript"] -> subscript. 
+PASS: div[role="superscript"] -> superscript. 
 PASS: div[role="tablist"] -> tablist. 
 PASS: div[role="tab"] -> tab. 
 PASS: div[role="tabpanel"] -> tabpanel. 
 PASS: div[role="textbox"] -> . 
 PASS: div[role="term"] -> term. 
+PASS: div[role="time"] -> time. 
 PASS: div[role="timer"] -> timer. 
 PASS: div[role="toolbar"] -> toolbar. 
 PASS: div[role="tooltip"] -> tooltip. 
index 2e0e528..b046744 100644 (file)
@@ -50,10 +50,10 @@ code
       AXRole: AXStatic
       
 del:not([datetime])
-      AXRole: AXStatic
+      AXRole: AXDeletion
       
 del[datetime]
-      AXRole: AXStatic
+      AXRole: AXDeletion
       
 dfn
       AXRole: AXDefinition
@@ -203,10 +203,10 @@ input[type='week']
       AXRole: AXTextField
       
 ins:not([datetime])
-      AXRole: AXStatic
+      AXRole: AXInsertion
       
 ins[datetime]
-      AXRole: AXStatic
+      AXRole: AXInsertion
       
 map
       AXRole: 
@@ -523,6 +523,9 @@ div[role=contentinfo]
 div[role=definition]
       AXRole: AXDefinition
       
+div[role=deletion]
+      AXRole: AXDeletion
+      
 div[role=dialog]
       AXRole: AXDialog
       
@@ -694,6 +697,9 @@ div[role=heading]
 div[role=img]
       AXRole: AXImage
       
+div[role=insertion]
+      AXRole: AXInsertion
+      
 div[role=link]
       AXRole: AXLink
       
@@ -799,6 +805,12 @@ div[role=spinbutton]
 div[role=status]
       AXRole: AXStatusBar
       
+div[role=subscript]
+      AXRole: AXSubscript
+      
+div[role=superscript]
+      AXRole: AXSuperscript
+      
 div[role=switch]
       AXRole: AXToggleButton
       
@@ -817,6 +829,9 @@ div[role=term]
 div[role=textbox]
       AXRole: AXTextField
       
+div[role=time]
+      AXRole: AXStatic
+      
 div[role=timer]
       AXRole: AXTimer
       
index 18ecb7c..ca41831 100644 (file)
@@ -874,6 +874,11 @@ div[role=definition]
       AXSubrole: AXDefinition
       AXRoleDescription: definition
       
+div[role=deletion]
+      AXRole: AXGroup
+      AXSubrole: AXDeleteStyleGroup
+      AXRoleDescription: group
+      
 div[role=dialog]
       AXRole: AXGroup
       AXSubrole: AXApplicationDialog
@@ -1159,6 +1164,11 @@ div[role=img]
       AXSubrole: 
       AXRoleDescription: image
       
+div[role=insertion]
+      AXRole: AXGroup
+      AXSubrole: AXInsertStyleGroup
+      AXRoleDescription: group
+      
 div[role=link]
       AXRole: AXLink
       AXSubrole: 
@@ -1334,6 +1344,16 @@ div[role=status]
       AXSubrole: AXApplicationStatus
       AXRoleDescription: application status
       
+div[role=subscript]
+      AXRole: AXGroup
+      AXSubrole: AXSubscriptStyleGroup
+      AXRoleDescription: group
+      
+div[role=superscript]
+      AXRole: AXGroup
+      AXSubrole: AXSuperscriptStyleGroup
+      AXRoleDescription: group
+      
 div[role=switch]
       AXRole: AXCheckBox
       AXSubrole: AXSwitch
@@ -1364,6 +1384,11 @@ div[role=textbox]
       AXSubrole: 
       AXRoleDescription: text field
       
+div[role=time]
+      AXRole: AXGroup
+      AXSubrole: AXTimeGroup
+      AXRoleDescription: group
+      
 div[role=timer]
       AXRole: AXGroup
       AXSubrole: AXApplicationTimer
index 9c0ef7e..ccf4230 100644 (file)
@@ -7,6 +7,7 @@ PASS: a[href] -> link.
 PASS: article -> article. 
 PASS: aside -> complementary. 
 PASS: button -> button. 
+PASS: del -> deletion. 
 PASS: dfn -> definition. 
 PASS: dl -> . 
 PASS: footer -> contentinfo. 
@@ -41,7 +42,7 @@ PASS: input[type='text'] -> .
 PASS: input[type='time'] -> . 
 PASS: input[type='url'] -> . 
 PASS: input[type='week'] -> . 
-PASS: ins -> . 
+PASS: ins -> insertion
 PASS: mark -> . 
 PASS: math -> math. 
 PASS: meter -> meter. 
@@ -61,8 +62,8 @@ PASS: option -> option.
 PASS: optgroup -> option. 
 PASS: option -> option. 
 PASS: option -> option. 
-PASS: sub -> . 
-PASS: sup -> . 
+PASS: sub -> subscript
+PASS: sup -> superscript
 PASS: table -> table. 
 PASS: tr -> row. 
 PASS: th -> columnheader. 
@@ -78,7 +79,7 @@ PASS: td[role="gridcell"] -> gridcell.
 PASS: tr -> row. 
 PASS: td[role="gridcell"] -> gridcell. 
 PASS: textarea -> textbox. 
-PASS: time -> . 
+PASS: time -> time
 PASS: ul -> list. 
 PASS: li -> listitem. 
 PASS: var -> . 
@@ -107,6 +108,7 @@ PASS: div[role="combobox"] -> combobox.
 PASS: div[role="complementary"] -> complementary. 
 PASS: div[role="contentinfo"] -> contentinfo. 
 PASS: div[role="definition"] -> definition. 
+PASS: div[role="deletion"] -> deletion. 
 PASS: div[role="dialog"] -> dialog. 
 PASS: div[role="directory"] -> list. 
 PASS: div[role="document"] -> document. 
@@ -124,6 +126,7 @@ PASS: div[role="feed"] -> feed.
 PASS: div[role="group"] -> group. 
 PASS: div[role="heading"] -> heading. 
 PASS: div[role="img"] -> img. 
+PASS: div[role="insertion"] -> insertion. 
 PASS: div[role="link"] -> link. 
 PASS: div[role="list"] -> list. 
 PASS: div[role="listitem"] -> listitem. 
@@ -157,11 +160,14 @@ PASS: div[role="separator"] -> separator.
 PASS: div[role="slider"] -> slider. 
 PASS: div[role="spinbutton"] -> spinbutton. 
 PASS: div[role="status"] -> status. 
+PASS: div[role="subscript"] -> subscript. 
+PASS: div[role="superscript"] -> superscript. 
 PASS: div[role="tablist"] -> tablist. 
 PASS: div[role="tab"] -> tab. 
 PASS: div[role="tabpanel"] -> tabpanel. 
 PASS: div[role="textbox"] -> . 
 PASS: div[role="term"] -> term. 
+PASS: div[role="time"] -> time. 
 PASS: div[role="timer"] -> timer. 
 PASS: div[role="toolbar"] -> toolbar. 
 PASS: div[role="tooltip"] -> tooltip. 
index c177f04..6864744 100644 (file)
@@ -874,6 +874,11 @@ div[role=definition]
       AXSubrole: AXDefinition
       AXRoleDescription: definition
       
+div[role=deletion]
+      AXRole: AXGroup
+      AXSubrole: AXDeleteStyleGroup
+      AXRoleDescription: group
+      
 div[role=dialog]
       AXRole: AXGroup
       AXSubrole: AXApplicationDialog
@@ -1159,6 +1164,11 @@ div[role=img]
       AXSubrole: 
       AXRoleDescription: image
       
+div[role=insertion]
+      AXRole: AXGroup
+      AXSubrole: AXInsertStyleGroup
+      AXRoleDescription: group
+      
 div[role=link]
       AXRole: AXLink
       AXSubrole: 
@@ -1334,6 +1344,16 @@ div[role=status]
       AXSubrole: AXApplicationStatus
       AXRoleDescription: application status
       
+div[role=subscript]
+      AXRole: AXGroup
+      AXSubrole: AXSubscriptStyleGroup
+      AXRoleDescription: group
+      
+div[role=superscript]
+      AXRole: AXGroup
+      AXSubrole: AXSuperscriptStyleGroup
+      AXRoleDescription: group
+      
 div[role=switch]
       AXRole: AXCheckBox
       AXSubrole: AXSwitch
@@ -1364,6 +1384,11 @@ div[role=textbox]
       AXSubrole: 
       AXRoleDescription: text field
       
+div[role=time]
+      AXRole: AXGroup
+      AXSubrole: AXTimeGroup
+      AXRoleDescription: group
+      
 div[role=timer]
       AXRole: AXGroup
       AXSubrole: AXApplicationTimer
index d36d08d..4c53eca 100644 (file)
@@ -7,6 +7,7 @@ PASS: a[href] -> link.
 PASS: article -> article. 
 PASS: aside -> complementary. 
 PASS: button -> button. 
+PASS: del -> deletion. 
 PASS: dfn -> definition. 
 PASS: dl -> . 
 PASS: footer -> contentinfo. 
@@ -41,7 +42,7 @@ PASS: input[type='text'] -> .
 PASS: input[type='time'] -> . 
 PASS: input[type='url'] -> . 
 PASS: input[type='week'] -> . 
-PASS: ins -> . 
+PASS: ins -> insertion
 PASS: math -> math. 
 PASS: nav -> navigation. 
 PASS: ol -> list. 
@@ -61,8 +62,8 @@ PASS: option -> option.
 PASS: optgroup -> option. 
 PASS: option -> option. 
 PASS: option -> option. 
-PASS: sub -> . 
-PASS: sup -> . 
+PASS: sub -> subscript
+PASS: sup -> superscript
 PASS: table -> table. 
 PASS: caption -> caption. 
 PASS: tr -> row. 
@@ -79,7 +80,7 @@ PASS: td[role="gridcell"] -> gridcell.
 PASS: tr -> row. 
 PASS: td[role="gridcell"] -> gridcell. 
 PASS: textarea -> textbox. 
-PASS: time -> . 
+PASS: time -> time
 PASS: ul -> list. 
 PASS: li -> listitem. 
 PASS: var -> . 
@@ -108,6 +109,7 @@ PASS: div[role="combobox"] -> combobox.
 PASS: div[role="complementary"] -> complementary. 
 PASS: div[role="contentinfo"] -> contentinfo. 
 PASS: div[role="definition"] -> definition. 
+PASS: div[role="deletion"] -> deletion. 
 PASS: div[role="dialog"] -> dialog. 
 PASS: div[role="directory"] -> list. 
 PASS: div[role="document"] -> document. 
@@ -125,6 +127,7 @@ PASS: div[role="feed"] -> feed.
 PASS: div[role="group"] -> group. 
 PASS: div[role="heading"] -> heading. 
 PASS: div[role="img"] -> img. 
+PASS: div[role="insertion"] -> insertion. 
 PASS: div[role="link"] -> link. 
 PASS: div[role="list"] -> list. 
 PASS: div[role="listitem"] -> listitem. 
@@ -158,11 +161,14 @@ PASS: div[role="separator"] -> separator.
 PASS: div[role="slider"] -> slider. 
 PASS: div[role="spinbutton"] -> spinbutton. 
 PASS: div[role="status"] -> status. 
+PASS: div[role="subscript"] -> subscript. 
+PASS: div[role="superscript"] -> superscript. 
 PASS: div[role="tablist"] -> tablist. 
 PASS: div[role="tab"] -> tab. 
 PASS: div[role="tabpanel"] -> tabpanel. 
 PASS: div[role="textbox"] -> . 
 PASS: div[role="term"] -> term. 
+PASS: div[role="time"] -> time. 
 PASS: div[role="timer"] -> timer. 
 PASS: div[role="toolbar"] -> toolbar. 
 PASS: div[role="tooltip"] -> tooltip. 
index 5b2ebd4..5ca0aca 100644 (file)
@@ -50,10 +50,10 @@ code
       AXRole: AXStatic
       
 del:not([datetime])
-      AXRole: AXStatic
+      AXRole: AXDeletion
       
 del[datetime]
-      AXRole: AXStatic
+      AXRole: AXDeletion
       
 dfn
       AXRole: AXDefinition
@@ -203,10 +203,10 @@ input[type='week']
       AXRole: AXTextField
       
 ins:not([datetime])
-      AXRole: AXStatic
+      AXRole: AXInsertion
       
 ins[datetime]
-      AXRole: AXStatic
+      AXRole: AXInsertion
       
 map
       AXRole: 
@@ -523,6 +523,9 @@ div[role=contentinfo]
 div[role=definition]
       AXRole: AXDefinition
       
+div[role=deletion]
+      AXRole: AXDeletion
+      
 div[role=dialog]
       AXRole: AXDialog
       
@@ -694,6 +697,9 @@ div[role=heading]
 div[role=img]
       AXRole: AXImage
       
+div[role=insertion]
+      AXRole: AXInsertion
+      
 div[role=link]
       AXRole: AXLink
       
@@ -799,6 +805,12 @@ div[role=spinbutton]
 div[role=status]
       AXRole: AXStatusBar
       
+div[role=subscript]
+      AXRole: AXSubscript
+      
+div[role=superscript]
+      AXRole: AXSuperscript
+      
 div[role=switch]
       AXRole: AXToggleButton
       
@@ -817,6 +829,9 @@ div[role=term]
 div[role=textbox]
       AXRole: AXTextField
       
+div[role=time]
+      AXRole: AXStatic
+      
 div[role=timer]
       AXRole: AXTimer
       
index 9e2e9a9..add83dd 100644 (file)
@@ -1,3 +1,43 @@
+2019-07-11  Joanmarie Diggs  <jdiggs@igalia.com>
+
+        AX: Implement support for ARIA roles insertion, deletion, subscript, superscript, and time
+        https://bugs.webkit.org/show_bug.cgi?id=199692
+
+        Reviewed by Chris Fleizach.
+
+        Create new AccessibilityRole types which correspond to the new ARIA roles and
+        update AccessibilityRenderObject::determineAccessibilityRole() to assign these
+        internal roles to the related HTML elements.
+
+        Update both ATK and Mac to recognize these new internal roles. In addition, update
+        the ATK mappings for the ins and del elements to ATK_ROLE_CONTENT_INSERTION and
+        ATK_ROLE_CONTENT_DELETION respectively. Also expose "insertion" and "deletion" via
+        the AtkObject xml-roles attribute so that this information is not completely absent
+        for GTK or WPE built against earlier versions of ATK.
+
+        Remove AccessibilityObject's isSubscriptStyleGroup() and isSuperscriptStyleGroup().
+        These two methods were only being used by ATK and are no longer needed for platform
+        role mapping.
+
+        No new tests. Instead add the roles to the existing role-exposure tests.
+
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::initializeRoleMap):
+        (WebCore::AccessibilityObject::isSubscriptStyleGroup const): Deleted.
+        (WebCore::AccessibilityObject::isSuperscriptStyleGroup const): Deleted.
+        * accessibility/AccessibilityObject.h:
+        * accessibility/AccessibilityObjectInterface.h:
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
+        * accessibility/atk/WebKitAccessible.cpp:
+        (webkitAccessibleGetAttributes):
+        (atkRole):
+        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+        (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (createAccessibilityRoleMap):
+        (-[WebAccessibilityObjectWrapper subrole]):
+
 2019-07-11  Thibault Saunier  <tsaunier@igalia.com>
 
         [GStreamer][MediaStream] Use the new dispatchMediaSampleToObservers to dispatch new buffers
index 7d592b8..e148ee5 100644 (file)
@@ -2345,6 +2345,7 @@ static void initializeRoleMap()
         { "checkbox", AccessibilityRole::CheckBox },
         { "complementary", AccessibilityRole::LandmarkComplementary },
         { "contentinfo", AccessibilityRole::LandmarkContentInfo },
+        { "deletion", AccessibilityRole::Deletion },
         { "dialog", AccessibilityRole::ApplicationDialog },
         { "directory", AccessibilityRole::Directory },
         // The 'doc-*' roles are defined the ARIA DPUB mobile: https://www.w3.org/TR/dpub-aam-1.0/ 
@@ -2407,6 +2408,7 @@ static void initializeRoleMap()
         { "group", AccessibilityRole::ApplicationGroup },
         { "heading", AccessibilityRole::Heading },
         { "img", AccessibilityRole::Image },
+        { "insertion", AccessibilityRole::Insertion },
         { "link", AccessibilityRole::WebCoreLink },
         { "list", AccessibilityRole::List },
         { "listitem", AccessibilityRole::ListItem },
@@ -2440,6 +2442,8 @@ static void initializeRoleMap()
         { "slider", AccessibilityRole::Slider },
         { "spinbutton", AccessibilityRole::SpinButton },
         { "status", AccessibilityRole::ApplicationStatus },
+        { "subscript", AccessibilityRole::Subscript },
+        { "superscript", AccessibilityRole::Superscript },
         { "switch", AccessibilityRole::Switch },
         { "tab", AccessibilityRole::Tab },
         { "tablist", AccessibilityRole::TabList },
@@ -2447,6 +2451,7 @@ static void initializeRoleMap()
         { "text", AccessibilityRole::StaticText },
         { "textbox", AccessibilityRole::TextArea },
         { "term", AccessibilityRole::Term },
+        { "time", AccessibilityRole::Time },
         { "timer", AccessibilityRole::ApplicationTimer },
         { "toolbar", AccessibilityRole::Toolbar },
         { "tooltip", AccessibilityRole::UserInterfaceTooltip },
@@ -3504,18 +3509,6 @@ bool AccessibilityObject::isStyleFormatGroup() const
     || node->hasTagName(supTag) || node->hasTagName(subTag);
 }
 
-bool AccessibilityObject::isSubscriptStyleGroup() const
-{
-    Node* node = this->node();
-    return node && node->hasTagName(subTag);
-}
-
-bool AccessibilityObject::isSuperscriptStyleGroup() const
-{
-    Node* node = this->node();
-    return node && node->hasTagName(supTag);
-}
-
 bool AccessibilityObject::isFigureElement() const
 {
     Node* node = this->node();
index 4995a4a..e172f5f 100644 (file)
@@ -452,8 +452,6 @@ public:
     bool isSplitter() const { return roleValue() == AccessibilityRole::Splitter; }
     bool isToolbar() const { return roleValue() == AccessibilityRole::Toolbar; }
     bool isStyleFormatGroup() const;
-    bool isSubscriptStyleGroup() const;
-    bool isSuperscriptStyleGroup() const;
     bool isFigureElement() const;
     bool isKeyboardFocusable() const;
     bool isSummary() const { return roleValue() == AccessibilityRole::Summary; }
index 92b2a90..98ffb31 100644 (file)
@@ -75,6 +75,7 @@ enum class AccessibilityRole {
     ColumnHeader,
     ComboBox,
     Definition,
+    Deletion,
     DescriptionList,
     DescriptionListTerm,
     DescriptionListDetail,
@@ -109,6 +110,7 @@ enum class AccessibilityRole {
     ImageMap,
     ImageMapLink,
     Incrementor,
+    Insertion,
     Label,
     LandmarkBanner,
     LandmarkComplementary,
@@ -166,7 +168,9 @@ enum class AccessibilityRole {
     SplitGroup,
     Splitter,
     StaticText,
+    Subscript,
     Summary,
+    Superscript,
     Switch,
     SystemWide,
     SVGRoot,
index 05af025..9e4ea3a 100644 (file)
@@ -2813,8 +2813,17 @@ AccessibilityRole AccessibilityRenderObject::determineAccessibilityRole()
     if (m_renderer->isSVGRoot())
         return AccessibilityRole::SVGRoot;
     
-    if (isStyleFormatGroup())
+    if (isStyleFormatGroup()) {
+        if (node->hasTagName(delTag))
+            return AccessibilityRole::Deletion;
+        if (node->hasTagName(insTag))
+            return AccessibilityRole::Insertion;
+        if (node->hasTagName(subTag))
+            return AccessibilityRole::Subscript;
+        if (node->hasTagName(supTag))
+            return AccessibilityRole::Superscript;
         return is<RenderInline>(*m_renderer) ? AccessibilityRole::Inline : AccessibilityRole::TextGroup;
+    }
     
     if (node && node->hasTagName(ddTag))
         return AccessibilityRole::DescriptionListDetail;
index 5c8f60c..f6ef9fc 100644 (file)
@@ -520,7 +520,10 @@ static AtkAttributeSet* webkitAccessibleGetAttributes(AtkObject* object)
 
         // The HTML AAM maps several elements to ARIA landmark roles. In order for the type of landmark
         // to be obtainable in the same fashion as an ARIA landmark, fall back on the computedRoleString.
-        if (coreObject->ariaRoleAttribute() == AccessibilityRole::Unknown && coreObject->isLandmark())
+        // We also want to do this for the style-format-group element types so that the type of format
+        // group it is doesn't get lost to a generic platform role.
+        if (coreObject->ariaRoleAttribute() == AccessibilityRole::Unknown
+            && (coreObject->isLandmark() || coreObject->isStyleFormatGroup()))
             attributeSet = addToAtkAttributeSet(attributeSet, "xml-roles", computedRoleString.utf8().data());
     }
 
@@ -799,12 +802,23 @@ static AtkRole atkRole(AccessibilityObject* coreObject)
         return ATK_ROLE_DESCRIPTION_TERM;
     case AccessibilityRole::DescriptionListDetail:
         return ATK_ROLE_DESCRIPTION_VALUE;
-    case AccessibilityRole::Inline:
-        if (coreObject->isSubscriptStyleGroup())
-            return ATK_ROLE_SUBSCRIPT;
-        if (coreObject->isSuperscriptStyleGroup())
-            return ATK_ROLE_SUPERSCRIPT;
+    case AccessibilityRole::Deletion:
+#if ATK_CHECK_VERSION(2, 33, 3)
+        return ATK_ROLE_CONTENT_DELETION;
+#else
         return ATK_ROLE_STATIC;
+#endif
+    case AccessibilityRole::Insertion:
+#if ATK_CHECK_VERSION(2, 33, 3)
+        return ATK_ROLE_CONTENT_INSERTION;
+#else
+        return ATK_ROLE_STATIC;
+#endif
+    case AccessibilityRole::Subscript:
+        return ATK_ROLE_SUBSCRIPT;
+    case AccessibilityRole::Superscript:
+        return ATK_ROLE_SUPERSCRIPT;
+    case AccessibilityRole::Inline:
     case AccessibilityRole::SVGTextPath:
     case AccessibilityRole::SVGTSpan:
     case AccessibilityRole::Time:
index 1cd2725..482a8ae 100644 (file)
@@ -942,6 +942,7 @@ static AccessibilityObjectWrapper* AccessibilityUnignoredAncestor(AccessibilityO
     case AccessibilityRole::Column:
     case AccessibilityRole::ColumnHeader:
     case AccessibilityRole::Definition:
+    case AccessibilityRole::Deletion:
     case AccessibilityRole::DescriptionList:
     case AccessibilityRole::DescriptionListTerm:
     case AccessibilityRole::DescriptionListDetail:
@@ -967,6 +968,7 @@ static AccessibilityObjectWrapper* AccessibilityUnignoredAncestor(AccessibilityO
     case AccessibilityRole::HelpTag:
     case AccessibilityRole::Ignored:
     case AccessibilityRole::Inline:
+    case AccessibilityRole::Insertion:
     case AccessibilityRole::Label:
     case AccessibilityRole::LandmarkBanner:
     case AccessibilityRole::LandmarkComplementary:
@@ -1007,6 +1009,8 @@ static AccessibilityObjectWrapper* AccessibilityUnignoredAncestor(AccessibilityO
     case AccessibilityRole::SpinButtonPart:
     case AccessibilityRole::SplitGroup:
     case AccessibilityRole::Splitter:
+    case AccessibilityRole::Subscript:
+    case AccessibilityRole::Superscript:
     case AccessibilityRole::Summary:
     case AccessibilityRole::SystemWide:
     case AccessibilityRole::SVGRoot:
index f9a1844..2bdb3df 100644 (file)
@@ -2176,6 +2176,10 @@ static AccessibilityRoleMap createAccessibilityRoleMap()
         { AccessibilityRole::GraphicsObject, NSAccessibilityGroupRole },
         { AccessibilityRole::GraphicsSymbol, NSAccessibilityImageRole },
         { AccessibilityRole::Caption, NSAccessibilityGroupRole },
+        { AccessibilityRole::Deletion, NSAccessibilityGroupRole },
+        { AccessibilityRole::Insertion, NSAccessibilityGroupRole },
+        { AccessibilityRole::Subscript, NSAccessibilityGroupRole },
+        { AccessibilityRole::Superscript, NSAccessibilityGroupRole },
     };
     AccessibilityRoleMap roleMap;
     for (auto& role : roles)
@@ -2381,6 +2385,15 @@ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     if (m_object->isSwitch())
         return NSAccessibilitySwitchSubrole;
 
+    if (role == AccessibilityRole::Insertion)
+        return @"AXInsertStyleGroup";
+    if (role == AccessibilityRole::Deletion)
+        return @"AXDeleteStyleGroup";
+    if (role == AccessibilityRole::Superscript)
+        return @"AXSuperscriptStyleGroup";
+    if (role == AccessibilityRole::Subscript)
+        return @"AXSubscriptStyleGroup";
+
     if (m_object->isStyleFormatGroup()) {
         if (Node* node = m_object->node()) {
             if (node->hasTagName(kbdTag))
@@ -2395,14 +2408,6 @@ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
                 return @"AXVariableStyleGroup";
             if (node->hasTagName(citeTag))
                 return @"AXCiteStyleGroup";
-            if (node->hasTagName(insTag))
-                return @"AXInsertStyleGroup";
-            if (node->hasTagName(delTag))
-                return @"AXDeleteStyleGroup";
-            if (node->hasTagName(supTag))
-                return @"AXSuperscriptStyleGroup";
-            if (node->hasTagName(subTag))
-                return @"AXSubscriptStyleGroup";
         }
     }
     
index 7ed92d3..7067388 100644 (file)
@@ -1,3 +1,18 @@
+2019-07-11  Joanmarie Diggs  <jdiggs@igalia.com>
+
+        AX: Implement support for ARIA roles insertion, deletion, subscript, superscript, and time
+        https://bugs.webkit.org/show_bug.cgi?id=199692
+
+        Reviewed by Chris Fleizach.
+
+        Add support for output of AXDeletion and AXInsertion roles for tests.
+        Update GTK and WPE jhbuild modules to use version of ATK and AT-SPI2
+        which include ROLE_CONTENT_DELETION and ROLE_CONTENT_INSERTION.
+
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+        * gtk/jhbuild.modules:
+        * wpe/jhbuild.modules:
+
 2019-07-11  Adrian Perez de Castro  <aperez@igalia.com>
 
         [ews-build] Remove workers {ltilve,tanty}-gtk-wk2-ews from configuration
index b259db8..40e6b33 100644 (file)
@@ -529,6 +529,12 @@ const gchar* roleToString(AtkObject* object)
     case ATK_ROLE_FOOTNOTE:
         return "AXFootnote";
 #endif
+#if ATK_CHECK_VERSION(2, 33, 3)
+    case ATK_ROLE_CONTENT_DELETION:
+        return "AXDeletion";
+    case ATK_ROLE_CONTENT_INSERTION:
+        return "AXInsertion";
+#endif
     default:
         // We want to distinguish ATK_ROLE_UNKNOWN from a known AtkRole which
         // our DRT isn't properly handling.
index 43d2cde..3652e02 100644 (file)
   </autotools>
 
   <meson id="atk" mesonargs="-Dintrospection=false">
-    <branch module="pub/GNOME/sources/atk/2.32/atk-2.32.0.tar.xz" version="2.32.0"
+    <branch module="pub/GNOME/sources/atk/2.33/atk-2.33.3.tar.xz" version="2.33.3"
             repo="ftp.gnome.org"
-            hash="sha256:cb41feda7fe4ef0daa024471438ea0219592baf7c291347e5a858bb64e4091cc"/>
+            hash="sha256:532d1081e87b9f0a8d71733101e791818442fa1896531621d1aecc189e1a4ffe"/>
   </meson>
 
   <meson id="at-spi2-core" mesonargs="-Dintrospection=no">
-    <branch module="pub/GNOME/sources/at-spi2-core/2.32/at-spi2-core-2.32.1.tar.xz" version="2.32.1"
+    <branch module="pub/GNOME/sources/at-spi2-core/2.33/at-spi2-core-2.33.2.tar.xz" version="2.33.2"
             repo="ftp.gnome.org"
-            hash="sha256:3c2aa937ebfaca2c86569bce9b16a34fbe20d69ef0c58846313b1c42f53b0d53">
+            hash="sha256:0e3f44707cccf9ec9098f84abdf91ea654c919eac3c688400f8d261383cc2abe">
     </branch>
     <dependencies>
       <dep package="glib"/>
   </meson>
 
   <meson id="at-spi2-atk">
-    <branch module="pub/GNOME/sources/at-spi2-atk/2.32/at-spi2-atk-2.32.0.tar.xz" version="2.32.0"
+    <branch module="pub/GNOME/sources/at-spi2-atk/2.33/at-spi2-atk-2.33.2.tar.xz" version="2.33.2"
             repo="ftp.gnome.org"
-            hash="sha256:0b51e6d339fa2bcca3a3e3159ccea574c67b107f1ac8b00047fa60e34ce7a45c">
+            hash="sha256:64d4351b245d717ec6f4f81fd40fe67481ff8e62d3893d465f01e71d9a3db3d3">
     </branch>
     <dependencies>
       <dep package="glib"/>
index 3d953aa..06f5ee9 100644 (file)
 
 
   <meson id="atk" mesonargs="-Dintrospection=false">
-    <branch module="pub/GNOME/sources/atk/2.32/atk-2.32.0.tar.xz" version="2.32.0"
+    <branch module="pub/GNOME/sources/atk/2.33/atk-2.33.3.tar.xz" version="2.33.3"
             repo="ftp.gnome.org"
-            hash="sha256:cb41feda7fe4ef0daa024471438ea0219592baf7c291347e5a858bb64e4091cc"/>
+            hash="sha256:532d1081e87b9f0a8d71733101e791818442fa1896531621d1aecc189e1a4ffe"/>
     <dependencies>
       <dep package="glib"/>
     </dependencies>
   </meson>
 
   <meson id="at-spi2-core" mesonargs="-Dintrospection=no -Dx11=no">
-    <branch module="pub/GNOME/sources/at-spi2-core/2.32/at-spi2-core-2.32.1.tar.xz" version="2.32.1"
+    <branch module="pub/GNOME/sources/at-spi2-core/2.33/at-spi2-core-2.33.2.tar.xz" version="2.33.2"
             repo="ftp.gnome.org"
-            hash="sha256:3c2aa937ebfaca2c86569bce9b16a34fbe20d69ef0c58846313b1c42f53b0d53">
+            hash="sha256:0e3f44707cccf9ec9098f84abdf91ea654c919eac3c688400f8d261383cc2abe">
     </branch>
     <dependencies>
       <dep package="glib"/>
   </meson>
 
   <meson id="at-spi2-atk">
-    <branch module="pub/GNOME/sources/at-spi2-atk/2.32/at-spi2-atk-2.32.0.tar.xz" version="2.32.0"
+    <branch module="pub/GNOME/sources/at-spi2-atk/2.33/at-spi2-atk-2.33.2.tar.xz" version="2.33.2"
             repo="ftp.gnome.org"
-            hash="sha256:0b51e6d339fa2bcca3a3e3159ccea574c67b107f1ac8b00047fa60e34ce7a45c">
+            hash="sha256:64d4351b245d717ec6f4f81fd40fe67481ff8e62d3893d465f01e71d9a3db3d3">
     </branch>
     <dependencies>
       <dep package="glib"/>