Title: [151665] trunk
Revision
151665
Author
[email protected]
Date
2013-06-17 18:30:44 -0700 (Mon, 17 Jun 2013)

Log Message

AX: Correct accessibility role when -webkit-box:display is used.
https://bugs.webkit.org/show_bug.cgi?id=117706

Reviewed by Chris Fleizach.

Source/WebCore: 

accessibility/box-styled-lists.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole): If HTML token is
of the list element type, treat it as a ListItemRole accessibility role, regardless
of what specific renderer is being used.

LayoutTests: 

* accessibility/box-styled-lists.html: Added.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/accessibility/box-styled-lists-expected.txt: Added.
* platform/win/TestExpectations:
* platform/win/accessibility/box-styled-lists-expected.txt: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (151664 => 151665)


--- trunk/LayoutTests/ChangeLog	2013-06-18 01:19:13 UTC (rev 151664)
+++ trunk/LayoutTests/ChangeLog	2013-06-18 01:30:44 UTC (rev 151665)
@@ -1,3 +1,17 @@
+2013-06-17  Brent Fulgham  <[email protected]>
+
+        AX: Correct accessibility role when -webkit-box:display is used.
+        https://bugs.webkit.org/show_bug.cgi?id=117706
+
+        Reviewed by Chris Fleizach.
+
+        * accessibility/box-styled-lists.html: Added.
+        * platform/efl/TestExpectations:
+        * platform/gtk/TestExpectations:
+        * platform/mac/accessibility/box-styled-lists-expected.txt: Added.
+        * platform/win/TestExpectations:
+        * platform/win/accessibility/box-styled-lists-expected.txt: Added.
+
 2013-06-17  Ryosuke Niwa  <[email protected]>
 
         Mac rebaseline.

Added: trunk/LayoutTests/accessibility/box-styled-lists.html (0 => 151665)


--- trunk/LayoutTests/accessibility/box-styled-lists.html	                        (rev 0)
+++ trunk/LayoutTests/accessibility/box-styled-lists.html	2013-06-18 01:30:44 UTC (rev 151665)
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html>
+<script>
+
+    if (window.testRunner)
+        testRunner.dumpAsText();
+</script>
+<head>
+<style>
+    ol {
+        display: -webkit-box;
+    }
+    ul {
+        display: -webkit-box;
+    }
+    li {
+        display: -webkit-box;
+    }
+</style> 
+</head>
+<body id="body">
+  <div>
+    <div>
+      <ul>
+        <li id="test 1">test 1</li>
+        <li>test 2</li>
+      </ul>
+    </div>
+  </div>
+  <div>
+    <div>
+      <ol>
+        <li id="test a">test a</li>
+        <li>test b</li>
+      </ol>
+    </div>
+  </div>
+
+    <BR><BR><BR><hr><BR>
+    <div id="result"></div>    
+
+    <script>
+        if (window.accessibilityController) {
+            var result = document.getElementById("result");
+
+            var olListElement = window.accessibilityController.accessibleElementById("test 1");
+            result.innerText += 'il in ol role: ' + olListElement.role + "\n\n";
+
+            var ulListElement = window.accessibilityController.accessibleElementById("test a");
+            result.innerText += 'il in ul role: ' + ulListElement.role + "\n\n";
+        }
+    </script>
+</body>
+</html>

Modified: trunk/LayoutTests/platform/efl/TestExpectations (151664 => 151665)


--- trunk/LayoutTests/platform/efl/TestExpectations	2013-06-18 01:19:13 UTC (rev 151664)
+++ trunk/LayoutTests/platform/efl/TestExpectations	2013-06-18 01:30:44 UTC (rev 151665)
@@ -1778,3 +1778,5 @@
 webkit.org/b/116587 http/tests/websocket/tests/hybi/close-on-navigate-new-location.html [ Skip ]
 webkit.org/b/116587 http/tests/websocket/tests/hybi/multiple-subprotocols.html [ Skip ]
 webkit.org/b/116587 http/tests/websocket/tests/hybi/reload-crash.html [ Skip ]
+
+webkit.org/b/117706 accessibility/box-styled-lists.html [ Failure ]

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (151664 => 151665)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2013-06-18 01:19:13 UTC (rev 151664)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2013-06-18 01:30:44 UTC (rev 151665)
@@ -1409,6 +1409,8 @@
 webkit.org/b/113168 fast/js/large-expressions.html [ Failure ]
 webkit.org/b/113168 fast/js/toString-stack-overflow.html [ Failure ]
 
+webkit.org/b/117706 accessibility/box-styled-lists.html [ Failure ]
+
 #////////////////////////////////////////////////////////////////////////////////////////
 # End of Tests failing
 #////////////////////////////////////////////////////////////////////////////////////////

Added: trunk/LayoutTests/platform/mac/accessibility/box-styled-lists-expected.txt (0 => 151665)


--- trunk/LayoutTests/platform/mac/accessibility/box-styled-lists-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/box-styled-lists-expected.txt	2013-06-18 01:30:44 UTC (rev 151665)
@@ -0,0 +1,13 @@
+test 1
+test 2
+test a
+test b
+
+
+
+
+il in ol role: AXRole: AXGroup
+
+il in ul role: AXRole: AXGroup
+
+

Added: trunk/LayoutTests/platform/win/accessibility/box-styled-lists-expected.txt (0 => 151665)


--- trunk/LayoutTests/platform/win/accessibility/box-styled-lists-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/win/accessibility/box-styled-lists-expected.txt	2013-06-18 01:30:44 UTC (rev 151665)
@@ -0,0 +1,13 @@
+test 1
+test 2
+test a
+test b
+
+
+
+
+il in ol role: list item
+
+il in ul role: list item
+
+

Modified: trunk/Source/WebCore/ChangeLog (151664 => 151665)


--- trunk/Source/WebCore/ChangeLog	2013-06-18 01:19:13 UTC (rev 151664)
+++ trunk/Source/WebCore/ChangeLog	2013-06-18 01:30:44 UTC (rev 151665)
@@ -1,3 +1,17 @@
+2013-06-14  Brent Fulgham  <[email protected]>
+
+        AX: Correct accessibility role when -webkit-box:display is used.
+        https://bugs.webkit.org/show_bug.cgi?id=117706
+
+        Reviewed by Chris Fleizach.
+
+        accessibility/box-styled-lists.html
+
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::determineAccessibilityRole): If HTML token is
+        of the list element type, treat it as a ListItemRole accessibility role, regardless
+        of what specific renderer is being used.
+
 2013-06-17  Roger Fong  <[email protected]>
 
         Add some UNUSED_PARAMs to RenderBlock.cpp so that it builds properly if CSS_EXCLUSIONS is disabled.

Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (151664 => 151665)


--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp	2013-06-18 01:19:13 UTC (rev 151664)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp	2013-06-18 01:30:44 UTC (rev 151665)
@@ -2437,7 +2437,7 @@
             return ImageMapRole;
         return WebCoreLinkRole;
     }
-    if (cssBox && cssBox->isListItem())
+    if ((cssBox && cssBox->isListItem()) || (node && node->hasTagName(liTag)))
         return ListItemRole;
     if (m_renderer->isListMarker())
         return ListMarkerRole;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to