Title: [154976] trunk
Revision
154976
Author
commit-qu...@webkit.org
Date
2013-09-03 04:29:33 -0700 (Tue, 03 Sep 2013)

Log Message

Source/WebCore: [AX][ATK] Added support for sort and help attributes.
https://bugs.webkit.org/show_bug.cgi?id=120456

Patch by Krzysztof Czech <k.cz...@samsung.com> on 2013-09-03
Reviewed by Chris Fleizach.

Added support for aria-sort and aria-help attributes.

Test: accessibility/aria-sort.html

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

Tools: [AX][ATK] Added support for sort and help attributes
https://bugs.webkit.org/show_bug.cgi?id=120456

Patch by Krzysztof Czech <k.cz...@samsung.com> on 2013-09-03
Reviewed by Chris Fleizach.

Added missing implementation to AccessibilityUIElement::helpText and support for
aria-sort attribute.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(coreAttributeToAtkAttribute):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::coreAttributeToAtkAttribute):
(WTR::AccessibilityUIElement::helpText):

LayoutTests: [AX][ATK] Added support for sort and help attributes
https://bugs.webkit.org/show_bug.cgi?id=120456

Patch by Krzysztof Czech <k.cz...@samsung.com> on 2013-09-03
Reviewed by Chris Fleizach.

Sharing aria-sort.html specific mac test with efl and gtk.
Changing specific expectations of some accessibility tests.

* accessibility/aria-sort-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/aria-sort-expected.txt.
* accessibility/aria-sort.html: Renamed from LayoutTests/platform/mac/accessibility/aria-sort.html.
* platform/efl-wk2/TestExpectations:
* platform/efl-wk2/accessibility/image-link-expected.txt:
* platform/efl-wk2/accessibility/image-map2-expected.txt:
* platform/efl-wk2/accessibility/table-cell-spans-expected.txt:
* platform/efl-wk2/accessibility/table-cells-expected.txt:
* platform/gtk/accessibility/image-link-expected.txt:
* platform/gtk/accessibility/image-map2-expected.txt:
* platform/gtk/accessibility/table-cell-spans-expected.txt:
* platform/gtk/accessibility/table-cells-expected.txt:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (154975 => 154976)


--- trunk/LayoutTests/ChangeLog	2013-09-03 10:10:37 UTC (rev 154975)
+++ trunk/LayoutTests/ChangeLog	2013-09-03 11:29:33 UTC (rev 154976)
@@ -1,3 +1,25 @@
+2013-09-03  Krzysztof Czech  <k.cz...@samsung.com>
+
+        [AX][ATK] Added support for sort and help attributes
+        https://bugs.webkit.org/show_bug.cgi?id=120456
+
+        Reviewed by Chris Fleizach.
+
+        Sharing aria-sort.html specific mac test with efl and gtk.
+        Changing specific expectations of some accessibility tests.
+
+        * accessibility/aria-sort-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/aria-sort-expected.txt.
+        * accessibility/aria-sort.html: Renamed from LayoutTests/platform/mac/accessibility/aria-sort.html.
+        * platform/efl-wk2/TestExpectations:
+        * platform/efl-wk2/accessibility/image-link-expected.txt:
+        * platform/efl-wk2/accessibility/image-map2-expected.txt:
+        * platform/efl-wk2/accessibility/table-cell-spans-expected.txt:
+        * platform/efl-wk2/accessibility/table-cells-expected.txt:
+        * platform/gtk/accessibility/image-link-expected.txt:
+        * platform/gtk/accessibility/image-map2-expected.txt:
+        * platform/gtk/accessibility/table-cell-spans-expected.txt:
+        * platform/gtk/accessibility/table-cells-expected.txt:
+
 2013-09-03  Mihnea Ovidenie  <mih...@adobe.com>
 
         [CSS Regions] position: fixed is computed relative to the first region, not the viewport

Copied: trunk/LayoutTests/accessibility/aria-sort-expected.txt (from rev 154975, trunk/LayoutTests/platform/mac/accessibility/aria-sort-expected.txt) (0 => 154976)


--- trunk/LayoutTests/accessibility/aria-sort-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/accessibility/aria-sort-expected.txt	2013-09-03 11:29:33 UTC (rev 154976)
@@ -0,0 +1,15 @@
+button
+column
+row
+This tests that aria-sort will be exposed correctly to the Mac accessibility API.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS accessibilityController.focusedElement.stringAttributeValue('AXSortDirection') is 'AXUnknownSortDirection'
+PASS accessibilityController.focusedElement.stringAttributeValue('AXSortDirection') is 'AXAscendingSortDirection'
+PASS accessibilityController.focusedElement.stringAttributeValue('AXSortDirection') is 'AXDescendingSortDirection'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Copied: trunk/LayoutTests/accessibility/aria-sort.html (from rev 154975, trunk/LayoutTests/platform/mac/accessibility/aria-sort.html) (0 => 154976)


--- trunk/LayoutTests/accessibility/aria-sort.html	                        (rev 0)
+++ trunk/LayoutTests/accessibility/aria-sort.html	2013-09-03 11:29:33 UTC (rev 154976)
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body id="body">
+
+<div tabindex="0" id="button" role="button">button</div>
+
+<div role="grid">
+<div role="row">
+<div role="columnheader" aria-sort="ascending" tabindex="0" id="column">column</div>
+<div role="rowheader" aria-sort="descending" tabindex="0" id="row">row</div> 
+</div>
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+    description("This tests that aria-sort will be exposed correctly to the Mac accessibility API.");
+
+    if (window.accessibilityController) {
+
+        document.getElementById("button").focus();
+        shouldBe("accessibilityController.focusedElement.stringAttributeValue('AXSortDirection')", "'AXUnknownSortDirection'");
+
+        document.getElementById("column").focus();
+        shouldBe("accessibilityController.focusedElement.stringAttributeValue('AXSortDirection')", "'AXAscendingSortDirection'");
+
+        document.getElementById("row").focus();
+        shouldBe("accessibilityController.focusedElement.stringAttributeValue('AXSortDirection')", "'AXDescendingSortDirection'");
+    }
+
+</script>
+
+<script src=""
+</body>
+</html>

Modified: trunk/LayoutTests/platform/efl-wk2/TestExpectations (154975 => 154976)


--- trunk/LayoutTests/platform/efl-wk2/TestExpectations	2013-09-03 10:10:37 UTC (rev 154975)
+++ trunk/LayoutTests/platform/efl-wk2/TestExpectations	2013-09-03 11:29:33 UTC (rev 154976)
@@ -217,7 +217,6 @@
 
 # Missing EFL's accessibility functions
 webkit.org/b/112027 accessibility/aria-describedby-on-input.html [ Failure ]
-webkit.org/b/112028 accessibility/aria-help.html [ Failure ]
 webkit.org/b/111984 accessibility/aria-hidden-updates-alldescendants.html [ Failure ]
 webkit.org/b/111986 accessibility/aria-invalid.html [ Failure ]
 webkit.org/b/111987 accessibility/aria-link-supports-press.html [ Failure ]

Modified: trunk/LayoutTests/platform/efl-wk2/accessibility/image-link-expected.txt (154975 => 154976)


--- trunk/LayoutTests/platform/efl-wk2/accessibility/image-link-expected.txt	2013-09-03 10:10:37 UTC (rev 154975)
+++ trunk/LayoutTests/platform/efl-wk2/accessibility/image-link-expected.txt	2013-09-03 11:29:33 UTC (rev 154976)
@@ -20,7 +20,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: html-id:test, toolkit:WebKitEfl
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, html-id:test, toolkit:WebKitEfl
 
 Child 0:
 AXRole: AXImage
@@ -39,6 +39,6 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitEfl
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitEfl
 
 

Modified: trunk/LayoutTests/platform/efl-wk2/accessibility/image-map2-expected.txt (154975 => 154976)


--- trunk/LayoutTests/platform/efl-wk2/accessibility/image-map2-expected.txt	2013-09-03 10:10:37 UTC (rev 154975)
+++ trunk/LayoutTests/platform/efl-wk2/accessibility/image-map2-expected.txt	2013-09-03 11:29:33 UTC (rev 154976)
@@ -17,7 +17,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: html-id:result, toolkit:WebKitEfl
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, html-id:result, toolkit:WebKitEfl
 ------------
 AXRole: AXLink
 AXParent: AXWebArea
@@ -35,7 +35,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitEfl
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitEfl
 ------------
 AXRole: AXLink
 AXParent: AXWebArea
@@ -53,7 +53,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitEfl
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitEfl
 ------------
 
 

Modified: trunk/LayoutTests/platform/efl-wk2/accessibility/table-cell-spans-expected.txt (154975 => 154976)


--- trunk/LayoutTests/platform/efl-wk2/accessibility/table-cell-spans-expected.txt	2013-09-03 10:10:37 UTC (rev 154975)
+++ trunk/LayoutTests/platform/efl-wk2/accessibility/table-cell-spans-expected.txt	2013-09-03 11:29:33 UTC (rev 154976)
@@ -25,7 +25,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitEfl
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitEfl
 {0, 2}, {0, 2}
 
 ----------------------
@@ -47,7 +47,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitEfl
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitEfl
 {0, 2}, {0, 2}
 
 ----------------------
@@ -69,7 +69,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitEfl
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitEfl
 {2, 2}, {0, 1}
 
 ----------------------
@@ -91,7 +91,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitEfl
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitEfl
 {2, 2}, {0, 1}
 
 ----------------------
@@ -113,7 +113,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitEfl
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitEfl
 {2, 1}, {3, 1}
 
 ----------------------

Modified: trunk/LayoutTests/platform/efl-wk2/accessibility/table-cells-expected.txt (154975 => 154976)


--- trunk/LayoutTests/platform/efl-wk2/accessibility/table-cells-expected.txt	2013-09-03 10:10:37 UTC (rev 154975)
+++ trunk/LayoutTests/platform/efl-wk2/accessibility/table-cells-expected.txt	2013-09-03 11:29:33 UTC (rev 154976)
@@ -27,7 +27,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitEfl
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitEfl
 ------------------------
 [3,1]
 AXRole: AXCell
@@ -47,7 +47,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitEfl
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitEfl
 ------------------------
 [1,1]
 AXRole: AXCell
@@ -67,7 +67,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitEfl
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitEfl
 ------------------------
 [2,2]
 AXRole: AXCell
@@ -87,7 +87,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitEfl
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitEfl
 ------------------------
 [3,5]
 AXRole: AXCell
@@ -107,7 +107,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitEfl
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitEfl
 ------------------------
 [100,0]
 

Modified: trunk/LayoutTests/platform/gtk/accessibility/image-link-expected.txt (154975 => 154976)


--- trunk/LayoutTests/platform/gtk/accessibility/image-link-expected.txt	2013-09-03 10:10:37 UTC (rev 154975)
+++ trunk/LayoutTests/platform/gtk/accessibility/image-link-expected.txt	2013-09-03 11:29:33 UTC (rev 154976)
@@ -20,7 +20,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: html-id:test, toolkit:WebKitGtk
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, html-id:test, toolkit:WebKitGtk
 
 Child 0:
 AXRole: AXImage
@@ -39,6 +39,6 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitGtk
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitGtk
 
 

Modified: trunk/LayoutTests/platform/gtk/accessibility/image-map2-expected.txt (154975 => 154976)


--- trunk/LayoutTests/platform/gtk/accessibility/image-map2-expected.txt	2013-09-03 10:10:37 UTC (rev 154975)
+++ trunk/LayoutTests/platform/gtk/accessibility/image-map2-expected.txt	2013-09-03 11:29:33 UTC (rev 154976)
@@ -17,7 +17,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: html-id:result, toolkit:WebKitGtk
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, html-id:result, toolkit:WebKitGtk
 ------------
 AXRole: AXLink
 AXParent: AXWebArea
@@ -35,7 +35,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitGtk
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitGtk
 ------------
 AXRole: AXLink
 AXParent: AXWebArea
@@ -53,7 +53,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitGtk
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitGtk
 ------------
 
 

Modified: trunk/LayoutTests/platform/gtk/accessibility/table-cell-spans-expected.txt (154975 => 154976)


--- trunk/LayoutTests/platform/gtk/accessibility/table-cell-spans-expected.txt	2013-09-03 10:10:37 UTC (rev 154975)
+++ trunk/LayoutTests/platform/gtk/accessibility/table-cell-spans-expected.txt	2013-09-03 11:29:33 UTC (rev 154976)
@@ -25,7 +25,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitGtk
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitGtk
 {0, 2}, {0, 2}
 
 ----------------------
@@ -47,7 +47,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitGtk
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitGtk
 {0, 2}, {0, 2}
 
 ----------------------
@@ -69,7 +69,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitGtk
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitGtk
 {2, 2}, {0, 1}
 
 ----------------------
@@ -91,7 +91,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitGtk
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitGtk
 {2, 2}, {0, 1}
 
 ----------------------
@@ -113,7 +113,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitGtk
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitGtk
 {2, 1}, {3, 1}
 
 ----------------------

Modified: trunk/LayoutTests/platform/gtk/accessibility/table-cells-expected.txt (154975 => 154976)


--- trunk/LayoutTests/platform/gtk/accessibility/table-cells-expected.txt	2013-09-03 10:10:37 UTC (rev 154975)
+++ trunk/LayoutTests/platform/gtk/accessibility/table-cells-expected.txt	2013-09-03 11:29:33 UTC (rev 154976)
@@ -27,7 +27,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitGtk
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitGtk
 ------------------------
 [3,1]
 AXRole: AXCell
@@ -47,7 +47,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitGtk
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitGtk
 ------------------------
 [1,1]
 AXRole: AXCell
@@ -67,7 +67,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitGtk
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitGtk
 ------------------------
 [2,2]
 AXRole: AXCell
@@ -87,7 +87,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitGtk
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitGtk
 ------------------------
 [3,5]
 AXRole: AXCell
@@ -107,7 +107,7 @@
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: toolkit:WebKitGtk
+AXPlatformAttributes: aria-sort:AXUnknownSortDirection, toolkit:WebKitGtk
 ------------------------
 [100,0]
 

Deleted: trunk/LayoutTests/platform/mac/accessibility/aria-sort-expected.txt (154975 => 154976)


--- trunk/LayoutTests/platform/mac/accessibility/aria-sort-expected.txt	2013-09-03 10:10:37 UTC (rev 154975)
+++ trunk/LayoutTests/platform/mac/accessibility/aria-sort-expected.txt	2013-09-03 11:29:33 UTC (rev 154976)
@@ -1,15 +0,0 @@
-button
-column
-row
-This tests that aria-sort will be exposed correctly to the Mac accessibility API.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS accessibilityController.focusedElement.stringAttributeValue('AXSortDirection') is 'AXUnknownSortDirection'
-PASS accessibilityController.focusedElement.stringAttributeValue('AXSortDirection') is 'AXAscendingSortDirection'
-PASS accessibilityController.focusedElement.stringAttributeValue('AXSortDirection') is 'AXDescendingSortDirection'
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/platform/mac/accessibility/aria-sort.html (154975 => 154976)


--- trunk/LayoutTests/platform/mac/accessibility/aria-sort.html	2013-09-03 10:10:37 UTC (rev 154975)
+++ trunk/LayoutTests/platform/mac/accessibility/aria-sort.html	2013-09-03 11:29:33 UTC (rev 154976)
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src=""
-</head>
-<body id="body">
-
-<div tabindex="0" id="button" role="button">button</div>
-
-<div role="grid">
-<div role="row">
-<div role="columnheader" aria-sort="ascending" tabindex="0" id="column">column</div>
-<div role="rowheader" aria-sort="descending" tabindex="0" id="row">row</div> 
-</div>
-</div>
-
-<p id="description"></p>
-<div id="console"></div>
-
-<script>
-
-    description("This tests that aria-sort will be exposed correctly to the Mac accessibility API.");
-
-    if (window.accessibilityController) {
-
-        document.getElementById("button").focus();
-        shouldBe("accessibilityController.focusedElement.stringAttributeValue('AXSortDirection')", "'AXUnknownSortDirection'");
-
-        document.getElementById("column").focus();
-        shouldBe("accessibilityController.focusedElement.stringAttributeValue('AXSortDirection')", "'AXAscendingSortDirection'");
-
-        document.getElementById("row").focus();
-        shouldBe("accessibilityController.focusedElement.stringAttributeValue('AXSortDirection')", "'AXDescendingSortDirection'");
-    }
-
-</script>
-
-<script src=""
-</body>
-</html>

Modified: trunk/Source/WebCore/ChangeLog (154975 => 154976)


--- trunk/Source/WebCore/ChangeLog	2013-09-03 10:10:37 UTC (rev 154975)
+++ trunk/Source/WebCore/ChangeLog	2013-09-03 11:29:33 UTC (rev 154976)
@@ -1,3 +1,17 @@
+2013-09-03  Krzysztof Czech  <k.cz...@samsung.com>
+
+        [AX][ATK] Added support for sort and help attributes.
+        https://bugs.webkit.org/show_bug.cgi?id=120456
+
+        Reviewed by Chris Fleizach.
+
+        Added support for aria-sort and aria-help attributes.
+
+        Test: accessibility/aria-sort.html
+
+        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
+        (webkitAccessibleGetAttributes):
+
 2013-09-03  Allan Sandfeld Jensen  <allan.jen...@digia.com>
 
         [Qt] Remove dead code for QtXmlPatterns

Modified: trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp (154975 => 154976)


--- trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp	2013-09-03 10:10:37 UTC (rev 154975)
+++ trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp	2013-09-03 11:29:33 UTC (rev 154976)
@@ -502,6 +502,19 @@
     if (!invalidStatus.isEmpty() && invalidStatus != "false")
         attributeSet = addToAtkAttributeSet(attributeSet, "aria-invalid", coreObject->invalidStatus().string().utf8().data());
 
+    String helpText = coreObject->helpText();
+    if (!helpText.isEmpty())
+        attributeSet = addToAtkAttributeSet(attributeSet, "aria-help", helpText.utf8().data());
+
+    const char* sortDescription = "AXUnknownSortDirection";
+    AccessibilitySortDirection sortDirection = coreObject->sortDirection();
+    if (sortDirection == SortDirectionAscending)
+        sortDescription = "AXAscendingSortDirection";
+    else if (sortDirection == SortDirectionDescending)
+        sortDescription = "AXDescendingSortDirection";
+
+    attributeSet = addToAtkAttributeSet(attributeSet, "aria-sort", sortDescription);
+
     return attributeSet;
 }
 

Modified: trunk/Tools/ChangeLog (154975 => 154976)


--- trunk/Tools/ChangeLog	2013-09-03 10:10:37 UTC (rev 154975)
+++ trunk/Tools/ChangeLog	2013-09-03 11:29:33 UTC (rev 154976)
@@ -1,3 +1,19 @@
+2013-09-03  Krzysztof Czech  <k.cz...@samsung.com>
+
+        [AX][ATK] Added support for sort and help attributes
+        https://bugs.webkit.org/show_bug.cgi?id=120456
+
+        Reviewed by Chris Fleizach.
+
+        Added missing implementation to AccessibilityUIElement::helpText and support for
+        aria-sort attribute.
+
+        * DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
+        (coreAttributeToAtkAttribute):
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+        (WTR::coreAttributeToAtkAttribute):
+        (WTR::AccessibilityUIElement::helpText):
+
 2013-09-03  Allan Sandfeld Jensen  <allan.jen...@digia.com>
 
         [Qt][WK1] PageVisibility tests are flaky

Modified: trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp (154975 => 154976)


--- trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp	2013-09-03 10:10:37 UTC (rev 154975)
+++ trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp	2013-09-03 11:29:33 UTC (rev 154976)
@@ -54,6 +54,9 @@
     if (attributeString == "AXPlaceholderValue")
         return "placeholder-text";
 
+    if (attributeString == "AXSortDirection")
+        return "aria-sort";
+
     return String();
 }
 

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (154975 => 154976)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp	2013-09-03 10:10:37 UTC (rev 154975)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp	2013-09-03 11:29:33 UTC (rev 154976)
@@ -57,6 +57,9 @@
 
     if (attributeString == "AXPlaceholderValue")
         return "placeholder-text";
+    
+    if (attributeString == "AXSortDirection")
+        return "aria-sort";
 
     return String();
 }
@@ -692,10 +695,12 @@
 
 JSRetainPtr<JSStringRef> AccessibilityUIElement::helpText() const
 {
-    // FIXME: implement
-    // We need a way to call WebCore::AccessibilityObject::helpText()
-    // from here, probably a new helper class in WebProcess/WebCoreSupport.
-    return JSStringCreateWithCharacters(0, 0);
+    if (!m_element || !ATK_IS_OBJECT(m_element.get()))
+        return JSStringCreateWithCharacters(0, 0);
+
+    String attributeValue = getAttributeSetValueForId(ATK_OBJECT(m_element.get()), "aria-help");
+    GOwnPtr<char> axValue(g_strdup_printf("AXHelp: %s", attributeValue.utf8().data()));
+    return JSStringCreateWithUTF8CString(axValue.get());
 }
 
 double AccessibilityUIElement::x()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to