Title: [138175] trunk
Revision
138175
Author
dmazz...@google.com
Date
2012-12-19 09:42:35 -0800 (Wed, 19 Dec 2012)

Log Message

Support titleUIElement in chromium DRT
https://bugs.webkit.org/show_bug.cgi?id=96529

Reviewed by Chris Fleizach.

Source/WebKit/chromium:

Fix implementation of titleUIElement - it shouldn't return anything
if supportsTitleUIElement returns false, so that accessible label
overriding logic works correctly.

* src/WebAccessibilityObject.cpp:
(WebKit::WebAccessibilityObject::titleUIElement):

LayoutTests:

Modify aria-labelledby-overrides-label.html to be more cross-platform,
with slightly different expectations on Mac & Chromium.

* accessibility/aria-labelledby-overrides-label.html:
* platform/chromium/TestExpectations:
* platform/chromium/accessibility/aria-labelledby-overrides-label-expected.txt: Copied from LayoutTests/accessibility/aria-labelledby-overrides-label-expected.txt.
* platform/mac/accessibility/aria-labelledby-overrides-label-expected.txt: Renamed from LayoutTests/accessibility/aria-labelledby-overrides-label-expected.txt.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (138174 => 138175)


--- trunk/LayoutTests/ChangeLog	2012-12-19 17:38:48 UTC (rev 138174)
+++ trunk/LayoutTests/ChangeLog	2012-12-19 17:42:35 UTC (rev 138175)
@@ -1,3 +1,18 @@
+2012-12-19  Dominic Mazzoni  <dmazz...@google.com>
+
+        Support titleUIElement in chromium DRT
+        https://bugs.webkit.org/show_bug.cgi?id=96529
+
+        Reviewed by Chris Fleizach.
+
+        Modify aria-labelledby-overrides-label.html to be more cross-platform,
+        with slightly different expectations on Mac & Chromium.
+
+        * accessibility/aria-labelledby-overrides-label.html:
+        * platform/chromium/TestExpectations:
+        * platform/chromium/accessibility/aria-labelledby-overrides-label-expected.txt: Copied from LayoutTests/accessibility/aria-labelledby-overrides-label-expected.txt.
+        * platform/mac/accessibility/aria-labelledby-overrides-label-expected.txt: Renamed from LayoutTests/accessibility/aria-labelledby-overrides-label-expected.txt.
+
 2012-12-19  Dominik Röttsches  <dominik.rottsc...@intel.com>
 
         [EFL] Unreviewed gardening.

Deleted: trunk/LayoutTests/accessibility/aria-labelledby-overrides-label-expected.txt (138174 => 138175)


--- trunk/LayoutTests/accessibility/aria-labelledby-overrides-label-expected.txt	2012-12-19 17:38:48 UTC (rev 138174)
+++ trunk/LayoutTests/accessibility/aria-labelledby-overrides-label-expected.txt	2012-12-19 17:42:35 UTC (rev 138175)
@@ -1,13 +0,0 @@
-Shut down computer after  minutes
-This tests that if aria-labelledby is used, then label elements are not used
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS text.description is 'AXDescription: Shut down computer after 10 minutes'
-PASS text.titleUIElement() != null && text.titleUIElement().isValid is false
-PASS labelElement.role is 'AXRole: AXStaticText'
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Modified: trunk/LayoutTests/accessibility/aria-labelledby-overrides-label.html (138174 => 138175)


--- trunk/LayoutTests/accessibility/aria-labelledby-overrides-label.html	2012-12-19 17:38:48 UTC (rev 138174)
+++ trunk/LayoutTests/accessibility/aria-labelledby-overrides-label.html	2012-12-19 17:42:35 UTC (rev 138175)
@@ -5,7 +5,7 @@
 </head>
 <body id="body">
 
-<span id="labelShutdown"><label for="" down computer after</label></span>
+<span id="labelShutdown"><label id="labelElement" for="" down computer after</label></span>
 <input id="shutdownTime" type="text" value="10" aria-labelledby="labelShutdown shutdownTime shutdownUnit" />
 <span id="shutdownUnit">minutes</span>
 
@@ -27,12 +27,10 @@
           // There should be no title UI element.
           shouldBe("text.titleUIElement() != null && text.titleUIElement().isValid", "false");
           
-          // The label element is in a group, in a group, in the web area.
-          var labelElement = accessibilityController.rootElement.childAtIndex(0).childAtIndex(0).childAtIndex(0).childAtIndex(0);
-
+          var labelElement = accessibilityController.accessibleElementById("labelElement");
           // This just makes sure that the label element is still visible in the AX hierarchy, even though
           // it's a label element (sometimes they are ignored).
-          shouldBe("labelElement.role", "'AXRole: AXStaticText'");
+          debug("Label element role is: " + labelElement.role);
     }
 
 </script>

Modified: trunk/LayoutTests/platform/chromium/TestExpectations (138174 => 138175)


--- trunk/LayoutTests/platform/chromium/TestExpectations	2012-12-19 17:38:48 UTC (rev 138174)
+++ trunk/LayoutTests/platform/chromium/TestExpectations	2012-12-19 17:42:35 UTC (rev 138175)
@@ -1389,7 +1389,6 @@
 crbug.com/10322 accessibility/aria-activedescendant-crash.html [ Skip ]
 crbug.com/10322 accessibility/aria-combobox.html [ Skip ]
 crbug.com/10322 accessibility/aria-invalid.html [ Skip ]
-crbug.com/10322 accessibility/aria-labelledby-overrides-label.html [ Skip ]
 crbug.com/10322 accessibility/aria-menubar-menuitems.html [ Skip ]
 crbug.com/10322 accessibility/aria-tables.html [ Skip ]
 crbug.com/10322 accessibility/aria-text-role.html [ Skip ]

Copied: trunk/LayoutTests/platform/chromium/accessibility/aria-labelledby-overrides-label-expected.txt (from rev 138174, trunk/LayoutTests/accessibility/aria-labelledby-overrides-label-expected.txt) (0 => 138175)


--- trunk/LayoutTests/platform/chromium/accessibility/aria-labelledby-overrides-label-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/chromium/accessibility/aria-labelledby-overrides-label-expected.txt	2012-12-19 17:42:35 UTC (rev 138175)
@@ -0,0 +1,13 @@
+Shut down computer after  minutes
+This tests that if aria-labelledby is used, then label elements are not used
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS text.description is 'AXDescription: Shut down computer after 10 minutes'
+PASS text.titleUIElement() != null && text.titleUIElement().isValid is false
+Label element role is: AXRole: AXLabel
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Copied: trunk/LayoutTests/platform/mac/accessibility/aria-labelledby-overrides-label-expected.txt (from rev 138174, trunk/LayoutTests/accessibility/aria-labelledby-overrides-label-expected.txt) (0 => 138175)


--- trunk/LayoutTests/platform/mac/accessibility/aria-labelledby-overrides-label-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/aria-labelledby-overrides-label-expected.txt	2012-12-19 17:42:35 UTC (rev 138175)
@@ -0,0 +1,13 @@
+Shut down computer after  minutes
+This tests that if aria-labelledby is used, then label elements are not used
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS text.description is 'AXDescription: Shut down computer after 10 minutes'
+PASS text.titleUIElement() != null && text.titleUIElement().isValid is false
+Label element role is: AXRole: AXGroup
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Modified: trunk/Source/WebKit/chromium/ChangeLog (138174 => 138175)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-12-19 17:38:48 UTC (rev 138174)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-12-19 17:42:35 UTC (rev 138175)
@@ -1,3 +1,17 @@
+2012-12-19  Dominic Mazzoni  <dmazz...@google.com>
+
+        Support titleUIElement in chromium DRT
+        https://bugs.webkit.org/show_bug.cgi?id=96529
+
+        Reviewed by Chris Fleizach.
+
+        Fix implementation of titleUIElement - it shouldn't return anything
+        if supportsTitleUIElement returns false, so that accessible label
+        overriding logic works correctly.
+
+        * src/WebAccessibilityObject.cpp:
+        (WebKit::WebAccessibilityObject::titleUIElement):
+
 2012-12-19  Gavin Peters  <gav...@chromium.org>
 
         [chromium] WebCore::Prerender::didStartPrerender depends on LinkLoader

Modified: trunk/Source/WebKit/chromium/src/WebAccessibilityObject.cpp (138174 => 138175)


--- trunk/Source/WebKit/chromium/src/WebAccessibilityObject.cpp	2012-12-19 17:38:48 UTC (rev 138174)
+++ trunk/Source/WebKit/chromium/src/WebAccessibilityObject.cpp	2012-12-19 17:42:35 UTC (rev 138175)
@@ -692,6 +692,9 @@
     if (isDetached())
         return WebAccessibilityObject();
 
+    if (!m_private->exposesTitleUIElement())
+        return WebAccessibilityObject();
+
     return WebAccessibilityObject(m_private->titleUIElement());
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to