Title: [159482] trunk
Revision
159482
Author
[email protected]
Date
2013-11-18 22:10:16 -0800 (Mon, 18 Nov 2013)

Log Message

AX: aria-labelledby should be used in preference to aria-labeledby
https://bugs.webkit.org/show_bug.cgi?id=62351

Reviewed by Chris Fleizach.

Source/WebCore:

Making sure aria-labelled by overrides the incorrectly spelled aria-labeledby attribute.

Test: accessibility/aria-labelledby-overrides-aria-labeledby.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::ariaLabeledByElements):

LayoutTests:

Added test to make sure aria-labelledby overrides aria-labeledby correctly.

* accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Added.
* accessibility/aria-labelledby-overrides-aria-labeledby.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (159481 => 159482)


--- trunk/LayoutTests/ChangeLog	2013-11-19 06:01:45 UTC (rev 159481)
+++ trunk/LayoutTests/ChangeLog	2013-11-19 06:10:16 UTC (rev 159482)
@@ -1,3 +1,15 @@
+2013-11-18  Samuel White  <[email protected]>
+
+        AX: aria-labelledby should be used in preference to aria-labeledby
+        https://bugs.webkit.org/show_bug.cgi?id=62351
+
+        Reviewed by Chris Fleizach.
+
+        Added test to make sure aria-labelledby overrides aria-labeledby correctly.
+
+        * accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Added.
+        * accessibility/aria-labelledby-overrides-aria-labeledby.html: Added.
+
 2013-11-18  Zalan Bujtas  <[email protected]>
 
         use after free in WebCore::DocumentOrderedMap::remove / WebCore::TreeScope::removeElementById

Added: trunk/LayoutTests/accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt (0 => 159482)


--- trunk/LayoutTests/accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt	2013-11-19 06:10:16 UTC (rev 159482)
@@ -0,0 +1,10 @@
+This tests that aria-labelledby overrides aria-labeledby correctly.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS linkDescription is 'AXDescription: Y Z'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/accessibility/aria-labelledby-overrides-aria-labeledby.html (0 => 159482)


--- trunk/LayoutTests/accessibility/aria-labelledby-overrides-aria-labeledby.html	                        (rev 0)
+++ trunk/LayoutTests/accessibility/aria-labelledby-overrides-aria-labeledby.html	2013-11-19 06:10:16 UTC (rev 159482)
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<title>aria-labelledby Overrides aria-labeledby</title>
+</head>
+<body>
+
+<div id="test">
+<a aria-labeledby="x1 x2" aria-labelledby="y1 y2" href="" id="link">X</a>
+<!-- Incorrectly spelled aria-labelledby attribute labels. -->
+<span id="x1">I</span>
+<span id="x2">J</span>
+<!-- Correctly spelled aria-labelledby attribute labels. -->
+<span id="y1">Y</span>
+<span id="y2">Z</span>
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+    description("This tests that aria-labelledby overrides aria-labeledby correctly.");
+    
+    if (window.accessibilityController) {
+        var linkDescription = accessibilityController.accessibleElementById("link").description;
+        
+        shouldBe("linkDescription", "'AXDescription: Y Z'");
+        
+        // Hide superfluous text.
+        document.getElementById("test").style.display = "none";
+    }
+</script>
+
+<script src=""
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (159481 => 159482)


--- trunk/Source/WebCore/ChangeLog	2013-11-19 06:01:45 UTC (rev 159481)
+++ trunk/Source/WebCore/ChangeLog	2013-11-19 06:10:16 UTC (rev 159482)
@@ -1,3 +1,17 @@
+2013-11-18  Samuel White  <[email protected]>
+
+        AX: aria-labelledby should be used in preference to aria-labeledby
+        https://bugs.webkit.org/show_bug.cgi?id=62351
+
+        Reviewed by Chris Fleizach.
+
+        Making sure aria-labelled by overrides the incorrectly spelled aria-labeledby attribute.
+
+        Test: accessibility/aria-labelledby-overrides-aria-labeledby.html
+
+        * accessibility/AccessibilityNodeObject.cpp:
+        (WebCore::AccessibilityNodeObject::ariaLabeledByElements):
+
 2013-11-18  Zalan Bujtas  <[email protected]>
 
         use after free in WebCore::DocumentOrderedMap::remove / WebCore::TreeScope::removeElementById

Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (159481 => 159482)


--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp	2013-11-19 06:01:45 UTC (rev 159481)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp	2013-11-19 06:10:16 UTC (rev 159482)
@@ -1900,9 +1900,9 @@
 
 void AccessibilityNodeObject::ariaLabeledByElements(Vector<Element*>& elements) const
 {
-    elementsFromAttribute(elements, aria_labeledbyAttr);
+    elementsFromAttribute(elements, aria_labelledbyAttr);
     if (!elements.size())
-        elementsFromAttribute(elements, aria_labelledbyAttr);
+        elementsFromAttribute(elements, aria_labeledbyAttr);
 }
 
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to