AX: [ATK] ARIA form role should be mapped to ATK_ROLE_LANDMARK; not ATK_ROLE_FORM
authorjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Oct 2017 21:29:24 +0000 (21:29 +0000)
committerjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Oct 2017 21:29:24 +0000 (21:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=178137

Reviewed by Chris Fleizach.

Source/WebCore:

Expose the ARIA form role as ATK_ROLE_LANDMARK; continue to expose the HTML form
element as ATK_ROLE_FORM.

No new tests needed due to existing coverage. Update expectations for roles-exposed.html.

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

Tools:

Add handling for ATK_ROLE_LANDMARK resulting from the ARIA form role.

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

LayoutTests:

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

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

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

index b024d54..b3f26cb 100644 (file)
@@ -1,3 +1,12 @@
+2017-10-10  Joanmarie Diggs  <jdiggs@igalia.com>
+
+        AX: [ATK] ARIA form role should be mapped to ATK_ROLE_LANDMARK; not ATK_ROLE_FORM
+        https://bugs.webkit.org/show_bug.cgi?id=178137
+
+        Reviewed by Chris Fleizach.
+
+        * platform/gtk/accessibility/roles-exposed-expected.txt: Updated expectations.
+
 2017-10-10  Matt Rajca  <mrajca@apple.com>
 
         Respect audio rate change restrictions in HTMLMediaElement::setVolume.
 2017-10-10  Matt Rajca  <mrajca@apple.com>
 
         Respect audio rate change restrictions in HTMLMediaElement::setVolume.
index 0f1738d..be93fe7 100644 (file)
@@ -647,7 +647,7 @@ div[role=figure]
       AXRole: AXGroup
       
 div[role=form]
       AXRole: AXGroup
       
 div[role=form]
-      AXRole: AXForm
+      AXRole: AXLandmarkForm
       
 div[role=grid]
       AXRole: AXTable
       
 div[role=grid]
       AXRole: AXTable
index f2dfce0..9032328 100644 (file)
@@ -1,3 +1,18 @@
+2017-10-10  Joanmarie Diggs  <jdiggs@igalia.com>
+
+        AX: [ATK] ARIA form role should be mapped to ATK_ROLE_LANDMARK; not ATK_ROLE_FORM
+        https://bugs.webkit.org/show_bug.cgi?id=178137
+
+        Reviewed by Chris Fleizach.
+
+        Expose the ARIA form role as ATK_ROLE_LANDMARK; continue to expose the HTML form
+        element as ATK_ROLE_FORM.
+
+        No new tests needed due to existing coverage. Update expectations for roles-exposed.html.
+
+        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
+        (atkRole):
+
 2017-10-10  Matt Rajca  <mrajca@apple.com>
 
         Respect audio rate change restrictions in HTMLMediaElement::setVolume.
 2017-10-10  Matt Rajca  <mrajca@apple.com>
 
         Respect audio rate change restrictions in HTMLMediaElement::setVolume.
index c536db6..bdc91c3 100644 (file)
@@ -773,6 +773,10 @@ static AtkRole atkRole(AccessibilityObject* coreObject)
     case FooterRole:
         return ATK_ROLE_FOOTER;
     case FormRole:
     case FooterRole:
         return ATK_ROLE_FOOTER;
     case FormRole:
+#if ATK_CHECK_VERSION(2, 11, 3)
+        if (coreObject->ariaRoleAttribute() != UnknownRole)
+            return ATK_ROLE_LANDMARK;
+#endif
         return ATK_ROLE_FORM;
     case CanvasRole:
         return ATK_ROLE_CANVAS;
         return ATK_ROLE_FORM;
     case CanvasRole:
         return ATK_ROLE_CANVAS;
index 6660e5d..05adbec 100644 (file)
@@ -1,3 +1,14 @@
+2017-10-10  Joanmarie Diggs  <jdiggs@igalia.com>
+
+        AX: [ATK] ARIA form role should be mapped to ATK_ROLE_LANDMARK; not ATK_ROLE_FORM
+        https://bugs.webkit.org/show_bug.cgi?id=178137
+
+        Reviewed by Chris Fleizach.
+
+        Add handling for ATK_ROLE_LANDMARK resulting from the ARIA form role.
+
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+
 2017-10-10  Jonathan Bedard  <jbedard@apple.com>
 
         run-webkit-tests: upload test results to multiple servers
 2017-10-10  Jonathan Bedard  <jbedard@apple.com>
 
         run-webkit-tests: upload test results to multiple servers
index 4502b89..47b2e67 100644 (file)
@@ -125,6 +125,7 @@ const String attributesMap[][2] = {
 const char* landmarkStringBanner = "AXLandmarkBanner";
 const char* landmarkStringComplementary = "AXLandmarkComplementary";
 const char* landmarkStringContentinfo = "AXLandmarkContentInfo";
 const char* landmarkStringBanner = "AXLandmarkBanner";
 const char* landmarkStringComplementary = "AXLandmarkComplementary";
 const char* landmarkStringContentinfo = "AXLandmarkContentInfo";
+const char* landmarkStringForm = "AXLandmarkForm";
 const char* landmarkStringMain = "AXLandmarkMain";
 const char* landmarkStringNavigation = "AXLandmarkNavigation";
 const char* landmarkStringRegion = "AXLandmarkRegion";
 const char* landmarkStringMain = "AXLandmarkMain";
 const char* landmarkStringNavigation = "AXLandmarkNavigation";
 const char* landmarkStringRegion = "AXLandmarkRegion";
@@ -394,6 +395,8 @@ const gchar* roleToString(AtkObject* object)
             return landmarkStringRegion;
         if (equalLettersIgnoringASCIICase(xmlRolesValue, "doc-toc"))
             return landmarkStringRegion;
             return landmarkStringRegion;
         if (equalLettersIgnoringASCIICase(xmlRolesValue, "doc-toc"))
             return landmarkStringRegion;
+        if (equalLettersIgnoringASCIICase(xmlRolesValue, "form"))
+            return landmarkStringForm;
         if (equalLettersIgnoringASCIICase(xmlRolesValue, "main"))
             return landmarkStringMain;
         if (equalLettersIgnoringASCIICase(xmlRolesValue, "navigation"))
         if (equalLettersIgnoringASCIICase(xmlRolesValue, "main"))
             return landmarkStringMain;
         if (equalLettersIgnoringASCIICase(xmlRolesValue, "navigation"))