[ATK] Expose accessibility objects for more WAI-ARIA roles
authormario.prada@samsung.com <mario.prada@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Dec 2013 16:18:30 +0000 (16:18 +0000)
committermario.prada@samsung.com <mario.prada@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Dec 2013 16:18:30 +0000 (16:18 +0000)
https://bugs.webkit.org/show_bug.cgi?id=125596

Reviewed by Chris Fleizach.

Source/WebCore:

Exposed accessibility objects with the proper AtkRoles, some of
them to be provided by the next stable release of ATK.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):

Tools:

Add mappings to DRT & WKTR for the newly exposed roles.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

LayoutTests:

Update test to update expectations.

* platform/gtk/accessibility/roles-exposed-expected.txt:
* platform/gtk/accessibility/roles-exposed.html:

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

LayoutTests/ChangeLog
LayoutTests/platform/gtk/accessibility/roles-exposed-expected.txt
LayoutTests/platform/gtk/accessibility/roles-exposed.html
Source/WebCore/ChangeLog
Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
Tools/ChangeLog
Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp

index 9ea1844..509b923 100644 (file)
@@ -1,3 +1,15 @@
+2013-12-16  Mario Sanchez Prada  <mario.prada@samsung.com>
+
+        [ATK] Expose accessibility objects for more WAI-ARIA roles
+        https://bugs.webkit.org/show_bug.cgi?id=125596
+
+        Reviewed by Chris Fleizach.
+
+        Update test to update expectations.
+
+        * platform/gtk/accessibility/roles-exposed-expected.txt:
+        * platform/gtk/accessibility/roles-exposed.html:
+
 2013-12-16  Eric Carlson  <eric.carlson@apple.com>
 
         Fix QuickTime plug-in replacement scripting bugs
index dc6ade7..0a89661 100644 (file)
@@ -126,6 +126,9 @@ PASS: input[type='url']
 PASS: input[type='week']
       AXRole: AXTextField
       
+PASS: math
+      AXRole: AXMath
+      
 PASS: nav
       AXRole: AXLandmarkNavigation
       
@@ -255,6 +258,12 @@ PASS: div[role=complementary]
 PASS: div[role=contentinfo]
       AXRole: AXLandmarkContentInfo
       
+PASS: div[role=definition]
+      AXRole: AXDefinition
+      
+PASS: div[role=dialog]
+      AXRole: AXDialog
+      
 PASS: div[role=directory]
       AXRole: AXList
       
@@ -296,9 +305,18 @@ FAIL: div[role=listbox]
 PASS: div[role=option]
       AXRole: AXListItem
       
+PASS: div[role=log]
+      AXRole: AXLog
+      
 PASS: div[role=main]
       AXRole: AXLandmarkMain
       
+PASS: div[role=marquee]
+      AXRole: AXMarquee
+      
+PASS: div[role=math]
+      AXRole: AXMath
+      
 PASS: div[role=menu]
       AXRole: AXMenu
       
@@ -326,6 +344,9 @@ PASS: div[role=menuitemradio]
 PASS: div[role=navigation]
       AXRole: AXLandmarkNavigation
       
+PASS: div[role=note]
+      AXRole: AXComment
+      
 PASS: div[role=progressbar]
       AXRole: AXProgressIndicator
       
@@ -359,6 +380,9 @@ PASS: div[role=tab]
 PASS: div[role=textbox]
       AXRole: AXTextField
       
+PASS: div[role=timer]
+      AXRole: AXTimer
+      
 PASS: div[role=toolbar]
       AXRole: AXToolbar
       
index 517fa7c..e116d4b 100644 (file)
@@ -1,4 +1,3 @@
-
 <!DOCTYPE HTML>
 <html>
 <body>
@@ -90,7 +89,7 @@
 <!-- skipped <link> -->
 <!-- skipped <map> -->
 <!-- skipped ATK: not focusable -- http://webkit.org/b/109018 <mark data-role="" class="ex">X</mark>-->
-<!-- http://webkit.org/b/125493 <math data-role="AXMath" class="ex">X</math>-->
+<math data-role="AXMath" class="ex">X</math>
 <!-- skipped <menu> -->
 <!-- skipped <meta> -->
 <!-- http://webkit.org/b/125491 <meter data-role="AXProgressIndicator" class="ex" value="0.75">X</meter>-->
 <div role="combobox"                 data-role="AXComboBox" class="ex">X</div>
 <div role="complementary"            data-role="AXLandmarkComplementary" class="ex">X</div>
 <div role="contentinfo"              data-role="AXLandmarkContentInfo" class="ex">X</div>
-<!-- http://webkit.org/b/125493 <div role="definition"               data-role="AXDefinition" class="ex">X</div>-->
-<!-- http://webkit.org/b/125493 <div role="dialog"                   data-role="AXGroup" class="ex">X</div>-->
+<div role="definition"               data-role="AXDefinition" class="ex">X</div>
+<div role="dialog"                   data-role="AXDialog" class="ex">X</div>
 <div role="directory"                data-role="AXList" class="ex">X</div>
 <!-- http://webkit.org/b/125493 <div role="document"                 data-role="AXGroup" class="ex">X</div>-->
 <!-- skipped ATK: wrong role <div role="form"                     data-role="AXForm" class="ex">X</div>-->
 <div role="listbox"                  data-role="AXListBox" class="ex"><!-- http://webkit.org/b/125491 -->
     <div role="option"               data-role="AXListItem" class="ex">X</div>
 </div>
-<!-- http://webkit.org/b/125493 <div role="log"                      data-role="AXLog" class="ex">X</div>-->
+<div role="log"                      data-role="AXLog" class="ex">X</div>
 <div role="main"                     data-role="AXLandmarkMain" class="ex">X</div>
-<!-- http://webkit.org/b/125493 <div role="marquee"                  data-role="AXMarquee" class="ex">X</div>-->
-<!-- http://webkit.org/b/125493 <div role="math"                     data-role="AXMath" class="ex">X</div>-->
+<div role="marquee"                  data-role="AXMarquee" class="ex">X</div>
+<div role="math"                     data-role="AXMath" class="ex">X</div>
 <div role="menu"                     data-role="AXMenu" class="ex">
     <!-- Note: diff between menuitem types is an attribute; need additional non-role verification in another test. -->
     <div role="menuitem"             data-role="AXMenuItem" class="ex">X</div>
     <div role="menuitemradio"        data-role="AXRadioMenuItem" class="ex">X</div>
 </div>
 <div role="navigation"               data-role="AXLandmarkNavigation" class="ex">X</div>
-<!-- http://webkit.org/b/125493 <div role="note"                     data-role="AXComment" class="ex">X</div>-->
+<div role="note"                     data-role="AXComment" class="ex">X</div>
 <!-- skipped: presentation elements should not be exposed directly <div role="presentation"             data-role="" class="ex">X</div>-->
 <div role="progressbar"              data-role="AXProgressIndicator" class="ex">X</div>
 <div role="radiogroup"               data-role="AXGroup" class="ex">
 </div>
 <!-- skipped ATK: wrong role <div role="tabpanel"                 data-role="AXGroup" panel" class="ex">X</div>-->
 <div role="textbox"                  data-role="AXTextField" class="ex">X</div>
-<!-- http://webkit.org/b/125493 <div role="timer"                    data-role="AXTimer" class="ex">X</div>-->
+<div role="timer"                    data-role="AXTimer" class="ex">X</div>
 <div role="toolbar"                  data-role="AXToolbar" class="ex">X</div>
 <!-- http://webkit.org/b/125493 <div role="tooltip"                  data-role="AXGroup" class="ex">X</div>-->
 <!-- http://webkit.org/b/125493 <div role="tree"                     data-role="AXOutline" class="ex">-->
index eeea934..25c1c16 100644 (file)
@@ -1,3 +1,16 @@
+2013-12-16  Mario Sanchez Prada  <mario.prada@samsung.com>
+
+        [ATK] Expose accessibility objects for more WAI-ARIA roles
+        https://bugs.webkit.org/show_bug.cgi?id=125596
+
+        Reviewed by Chris Fleizach.
+
+        Exposed accessibility objects with the proper AtkRoles, some of
+        them to be provided by the next stable release of ATK.
+
+        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
+        (atkRole):
+
 2013-12-16  Eric Carlson  <eric.carlson@apple.com>
 
         Fix QuickTime plug-in replacement scripting bugs
index 1dddaeb..600afbd 100644 (file)
@@ -665,6 +665,8 @@ static AtkRole atkRole(AccessibilityRole role)
 #endif
     case DocumentRole:
         return ATK_ROLE_DOCUMENT_FRAME;
+    case DocumentNoteRole:
+        return ATK_ROLE_COMMENT;
     case HeadingRole:
         return ATK_ROLE_HEADING;
     case ListBoxRole:
@@ -696,6 +698,16 @@ static AtkRole atkRole(AccessibilityRole role)
     case LandmarkApplicationRole:
         return ATK_ROLE_EMBEDDED;
 #if ATK_CHECK_VERSION(2, 11, 3)
+    case ApplicationLogRole:
+        return ATK_ROLE_LOG;
+    case ApplicationMarqueeRole:
+        return ATK_ROLE_MARQUEE;
+    case ApplicationTimerRole:
+        return ATK_ROLE_TIMER;
+    case DefinitionRole:
+        return ATK_ROLE_DEFINITION;
+    case DocumentMathRole:
+        return ATK_ROLE_MATH;
     case LandmarkBannerRole:
     case LandmarkComplementaryRole:
     case LandmarkContentInfoRole:
index 50ef47a..c947fa2 100644 (file)
@@ -1,5 +1,17 @@
 2013-12-16  Mario Sanchez Prada  <mario.prada@samsung.com>
 
+        [ATK] Expose accessibility objects for more WAI-ARIA roles
+        https://bugs.webkit.org/show_bug.cgi?id=125596
+
+        Reviewed by Chris Fleizach.
+
+        Add mappings to DRT & WKTR for the newly exposed roles.
+
+        * DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+
+2013-12-16  Mario Sanchez Prada  <mario.prada@samsung.com>
+
         [ATK] Expose accessibility objects with ATK_ROLE_CHECK_MENU_ITEM
         https://bugs.webkit.org/show_bug.cgi?id=125594
 
index 30437fc..904ff51 100644 (file)
@@ -224,6 +224,8 @@ const char* roleToString(AtkObject* object)
         return "AXColumnHeader";
     case ATK_ROLE_COMBO_BOX:
         return "AXComboBox";
+    case ATK_ROLE_COMMENT:
+        return "AXComment";
     case ATK_ROLE_DOCUMENT_FRAME:
         return "AXDocument";
     case ATK_ROLE_DOCUMENT_WEB:
@@ -327,6 +329,16 @@ const char* roleToString(AtkObject* object)
 #if ATK_CHECK_VERSION(2, 11, 3)
     case ATK_ROLE_ARTICLE:
         return "AXArticle";
+    case ATK_ROLE_DEFINITION:
+        return "AXDefinition";
+    case ATK_ROLE_LOG:
+        return "AXLog";
+    case ATK_ROLE_MARQUEE:
+        return "AXMarquee";
+    case ATK_ROLE_MATH:
+        return "AXMath";
+    case ATK_ROLE_TIMER:
+        return "AXTimer";
 #endif
     default:
         // We want to distinguish ATK_ROLE_UNKNOWN from a known AtkRole which
index 0bf02ab..2de0185 100644 (file)
@@ -313,6 +313,8 @@ const gchar* roleToString(AtkObject* object)
         return "AXColumnHeader";
     case ATK_ROLE_COMBO_BOX:
         return "AXComboBox";
+    case ATK_ROLE_COMMENT:
+        return "AXComment";
     case ATK_ROLE_DOCUMENT_FRAME:
         return "AXDocument";
     case ATK_ROLE_DOCUMENT_WEB:
@@ -416,6 +418,16 @@ const gchar* roleToString(AtkObject* object)
 #if ATK_CHECK_VERSION(2, 11, 3)
     case ATK_ROLE_ARTICLE:
         return "AXArticle";
+    case ATK_ROLE_DEFINITION:
+        return "AXDefinition";
+    case ATK_ROLE_LOG:
+        return "AXLog";
+    case ATK_ROLE_MARQUEE:
+        return "AXMarquee";
+    case ATK_ROLE_MATH:
+        return "AXMath";
+    case ATK_ROLE_TIMER:
+        return "AXTimer";
 #endif
     default:
         // We want to distinguish ATK_ROLE_UNKNOWN from a known AtkRole which