Title: [141186] trunk
- Revision
- 141186
- Author
- [email protected]
- Date
- 2013-01-29 16:59:59 -0800 (Tue, 29 Jan 2013)
Log Message
AX: Add support for aria-autocomplete="list" on ARIA combobox
https://bugs.webkit.org/show_bug.cgi?id=108228
Reviewed by Ryosuke Niwa.
Source/WebCore:
Comboboxes behave much like textfields, and so they need
to respond like text controls.
Test: platform/mac/accessibility/combox-box-value.html
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isTextControl):
(WebCore):
* accessibility/AccessibilityObject.h:
(AccessibilityObject):
LayoutTests:
* platform/mac/accessibility/combox-box-value-expected.txt: Added.
* platform/mac/accessibility/combox-box-value.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (141185 => 141186)
--- trunk/LayoutTests/ChangeLog 2013-01-30 00:59:21 UTC (rev 141185)
+++ trunk/LayoutTests/ChangeLog 2013-01-30 00:59:59 UTC (rev 141186)
@@ -1,3 +1,13 @@
+2013-01-29 Chris Fleizach <[email protected]>
+
+ AX: Add support for aria-autocomplete="list" on ARIA combobox
+ https://bugs.webkit.org/show_bug.cgi?id=108228
+
+ Reviewed by Ryosuke Niwa.
+
+ * platform/mac/accessibility/combox-box-value-expected.txt: Added.
+ * platform/mac/accessibility/combox-box-value.html: Added.
+
2013-01-29 Roger Fong <[email protected]>
Unreviewed. Skip a bunch of tests on Win7 in preparation of turning on EWS testers.
Added: trunk/LayoutTests/platform/mac/accessibility/combox-box-value-expected.txt (0 => 141186)
--- trunk/LayoutTests/platform/mac/accessibility/combox-box-value-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/combox-box-value-expected.txt 2013-01-30 00:59:59 UTC (rev 141186)
@@ -0,0 +1,12 @@
+
+This tests that a combobox element used on a native text control will return the correct AXValue and placeholder.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS combobox.stringValue is 'AXValue: text'
+PASS combobox.stringAttributeValue('AXPlaceholderValue') is 'Placeholder'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/platform/mac/accessibility/combox-box-value.html (0 => 141186)
--- trunk/LayoutTests/platform/mac/accessibility/combox-box-value.html (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/combox-box-value.html 2013-01-30 00:59:59 UTC (rev 141186)
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body id="body">
+
+<input id="combo" type="text" role="combobox" aria-autocomplete="list" aria-owns="statelist" placeholder="Placeholder" value="text">
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests that a combobox element used on a native text control will return the correct AXValue and placeholder.");
+
+ if (window.accessibilityController) {
+
+ var combobox = accessibilityController.accessibleElementById("combo");
+ shouldBe("combobox.stringValue", "'AXValue: text'");
+ shouldBe("combobox.stringAttributeValue('AXPlaceholderValue')", "'Placeholder'");
+ }
+
+</script>
+
+<script src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (141185 => 141186)
--- trunk/Source/WebCore/ChangeLog 2013-01-30 00:59:21 UTC (rev 141185)
+++ trunk/Source/WebCore/ChangeLog 2013-01-30 00:59:59 UTC (rev 141186)
@@ -1,3 +1,21 @@
+2013-01-29 Chris Fleizach <[email protected]>
+
+ AX: Add support for aria-autocomplete="list" on ARIA combobox
+ https://bugs.webkit.org/show_bug.cgi?id=108228
+
+ Reviewed by Ryosuke Niwa.
+
+ Comboboxes behave much like textfields, and so they need
+ to respond like text controls.
+
+ Test: platform/mac/accessibility/combox-box-value.html
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::isTextControl):
+ (WebCore):
+ * accessibility/AccessibilityObject.h:
+ (AccessibilityObject):
+
2013-01-29 Nico Weber <[email protected]>
[chromium] Do not mark translation-unit-local functions as extern "C"
Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (141185 => 141186)
--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2013-01-30 00:59:21 UTC (rev 141185)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2013-01-30 00:59:59 UTC (rev 141186)
@@ -268,6 +268,18 @@
return node() && node()->hasTagName(blockquoteTag);
}
+bool AccessibilityObject::isTextControl() const
+{
+ switch (roleValue()) {
+ case TextAreaRole:
+ case TextFieldRole:
+ case ComboBoxRole:
+ return true;
+ default:
+ return false;
+ }
+}
+
bool AccessibilityObject::isARIATextControl() const
{
return ariaRoleAttribute() == TextAreaRole || ariaRoleAttribute() == TextFieldRole;
Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (141185 => 141186)
--- trunk/Source/WebCore/accessibility/AccessibilityObject.h 2013-01-30 00:59:21 UTC (rev 141185)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h 2013-01-30 00:59:59 UTC (rev 141186)
@@ -422,7 +422,7 @@
virtual bool isSpinButtonPart() const { return false; }
virtual bool isMockObject() const { return false; }
virtual bool isMediaControlLabel() const { return false; }
- bool isTextControl() const { return roleValue() == TextAreaRole || roleValue() == TextFieldRole; }
+ bool isTextControl() const;
bool isARIATextControl() const;
bool isTabList() const { return roleValue() == TabListRole; }
bool isTabItem() const { return roleValue() == TabRole; }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes