AX: [GTK] Add support to query for aria-current
authorjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 May 2017 16:58:00 +0000 (16:58 +0000)
committerjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 May 2017 16:58:00 +0000 (16:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=149016

Reviewed by Chris Fleizach.

Tools:

Implement support for "AXARIACurrent" string attribute value.

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

LayoutTests:

* platform/gtk/TestExpectations: Unskip now-passing test.

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

LayoutTests/ChangeLog
LayoutTests/platform/gtk/TestExpectations
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp

index f358bf7..885d951 100644 (file)
@@ -1,3 +1,12 @@
+2017-05-01  Joanmarie Diggs  <jdiggs@igalia.com>
+
+        AX: [GTK] Add support to query for aria-current
+        https://bugs.webkit.org/show_bug.cgi?id=149016
+
+        Reviewed by Chris Fleizach.
+
+        * platform/gtk/TestExpectations: Unskip now-passing test.
+
 2017-05-01  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Unreviewed GTK+ gardening. Rebaseline giantRowspan tests after r215914.
index 2ef0fb9..cf261f4 100644 (file)
@@ -1016,8 +1016,6 @@ webkit.org/b/146724 fast/text/word-break-keep-all.html [ ImageOnlyFailure ]
 # This tests fail since the upgrade of GTK to 3.16 and Cairo to 1.14 on the JHBuild
 webkit.org/b/146731 fast/backgrounds/hidpi-background-image-contain-cover-scale-needs-more-precision.html [ ImageOnlyFailure Timeout ]
 
-webkit.org/b/149016 accessibility/aria-current.html [ Skip ]
-
 # ARIA 1.1 table related attributes are not supported
 webkit.org/b/148967 accessibility/aria-table-attributes.html [ Skip ]
 
index 7dafe8f..7b4e9a6 100644 (file)
@@ -1,3 +1,14 @@
+2017-05-01  Joanmarie Diggs  <jdiggs@igalia.com>
+
+        AX: [GTK] Add support to query for aria-current
+        https://bugs.webkit.org/show_bug.cgi?id=149016
+
+        Reviewed by Chris Fleizach.
+
+        Implement support for "AXARIACurrent" string attribute value.
+
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+
 2017-05-01  David Kilzer  <ddkilzer@apple.com>
 
         REGRESSION (r216000): test-webkitpy fails after adding new soft-linked class checker
index 60374bb..53ae143 100644 (file)
@@ -75,6 +75,7 @@ enum AttributesIndex {
     SetSizeIndex,
     PlaceholderNameIndex,
     SortNameIndex,
+    CurrentNameIndex,
 
     // Attribute values.
     SortAscendingValueIndex,
@@ -92,6 +93,7 @@ const String attributesMap[][2] = {
     { "AXARIASetSize", "setsize" },
     { "AXPlaceholderValue", "placeholder-text" } ,
     { "AXSortDirection", "sort" },
+    { "AXARIACurrent", "current" },
 
     // Attribute values.
     { "AXAscendingSortDirection", "ascending" },
@@ -132,6 +134,10 @@ String coreAttributeToAtkAttribute(JSStringRef attribute)
 String atkAttributeValueToCoreAttributeValue(AtkAttributeType type, const String& id, const String& value)
 {
     if (type == ObjectAttributeType) {
+        // We don't expose the "current" attribute if there is no author-provided value.
+        if (id == attributesMap[CurrentNameIndex][AtkDomain] && value.isEmpty())
+            return "false";
+
         // We need to translate ATK values exposed for 'aria-sort' (e.g. 'ascending')
         // into those expected by the layout tests (e.g. 'AXAscendingSortDirection').
         if (id == attributesMap[SortNameIndex][AtkDomain] && !value.isEmpty()) {