Title: [155078] trunk
- Revision
- 155078
- Author
- [email protected]
- Date
- 2013-09-04 15:55:52 -0700 (Wed, 04 Sep 2013)
Log Message
AX: when no other label on provided on form elements, WebKit should fall back to using @title
https://bugs.webkit.org/show_bug.cgi?id=112842
Patch by Samuel White <[email protected]> on 2013-09-04
Reviewed by Chris Fleizach.
Source/WebCore:
Don't let input elements include empty labels in their accessibility title.
Test: platform/mac/accessibility/input-title.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::titleElementText):
LayoutTests:
Added test to ensure that input elements are computing their
accessibility title as expected.
* platform/mac/accessibility/input-title-expected.txt: Added.
* platform/mac/accessibility/input-title.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (155077 => 155078)
--- trunk/LayoutTests/ChangeLog 2013-09-04 22:47:58 UTC (rev 155077)
+++ trunk/LayoutTests/ChangeLog 2013-09-04 22:55:52 UTC (rev 155078)
@@ -1,3 +1,16 @@
+2013-09-04 Samuel White <[email protected]>
+
+ AX: when no other label on provided on form elements, WebKit should fall back to using @title
+ https://bugs.webkit.org/show_bug.cgi?id=112842
+
+ Reviewed by Chris Fleizach.
+
+ Added test to ensure that input elements are computing their
+ accessibility title as expected.
+
+ * platform/mac/accessibility/input-title-expected.txt: Added.
+ * platform/mac/accessibility/input-title.html: Added.
+
2013-09-04 Tim Horton <[email protected]>
[mac] PDFDocumentImage should use PDFKit to draw
Added: trunk/LayoutTests/platform/mac/accessibility/input-title-expected.txt (0 => 155078)
--- trunk/LayoutTests/platform/mac/accessibility/input-title-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/input-title-expected.txt 2013-09-04 22:55:52 UTC (rev 155078)
@@ -0,0 +1,12 @@
+
+This tests that the input title is exposed correctly.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS green.description is 'AXDescription: green'
+PASS red.description is 'AXDescription: red'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/platform/mac/accessibility/input-title.html (0 => 155078)
--- trunk/LayoutTests/platform/mac/accessibility/input-title.html (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/input-title.html 2013-09-04 22:55:52 UTC (rev 155078)
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<title>Input Title</title>
+</head>
+<body>
+
+<input id="green" name="color" title="green" type="radio">
+<input id="red" name="color" title="red" type="radio">
+<label for=""
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+ description("This tests that the input title is exposed correctly.");
+
+ if (window.accessibilityController) {
+ var green = accessibilityController.accessibleElementById("green");
+ shouldBe("green.description", "'AXDescription: green'");
+
+ var red = accessibilityController.accessibleElementById("red");
+ shouldBe("red.description", "'AXDescription: red'");
+ }
+</script>
+
+<script src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (155077 => 155078)
--- trunk/Source/WebCore/ChangeLog 2013-09-04 22:47:58 UTC (rev 155077)
+++ trunk/Source/WebCore/ChangeLog 2013-09-04 22:55:52 UTC (rev 155078)
@@ -1,3 +1,17 @@
+2013-09-04 Samuel White <[email protected]>
+
+ AX: when no other label on provided on form elements, WebKit should fall back to using @title
+ https://bugs.webkit.org/show_bug.cgi?id=112842
+
+ Reviewed by Chris Fleizach.
+
+ Don't let input elements include empty labels in their accessibility title.
+
+ Test: platform/mac/accessibility/input-title.html
+
+ * accessibility/AccessibilityNodeObject.cpp:
+ (WebCore::AccessibilityNodeObject::titleElementText):
+
2013-09-04 Andreas Kling <[email protected]>
Make ImageQualityController per-RenderView.
Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (155077 => 155078)
--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp 2013-09-04 22:47:58 UTC (rev 155077)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp 2013-09-04 22:55:52 UTC (rev 155078)
@@ -1171,7 +1171,9 @@
HTMLLabelElement* label = labelForElement(toElement(node));
if (label) {
AccessibilityObject* labelObject = axObjectCache()->getOrCreate(label);
- textOrder.append(AccessibilityText(label->innerText(), LabelByElementText, labelObject));
+ String innerText = label->innerText();
+ if (!innerText.isEmpty())
+ textOrder.append(AccessibilityText(innerText, LabelByElementText, labelObject));
return;
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes