Title: [98962] trunk
- Revision
- 98962
- Author
- [email protected]
- Date
- 2011-11-01 08:19:20 -0700 (Tue, 01 Nov 2011)
Log Message
AX: some popup buttons not announced by VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=67743
Reviewed by Darin Adler.
Source/WebCore:
Test: platform/mac/accessibility/aria-popup-buttons-on-native-elements.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::stringValue):
(WebCore::AccessibilityRenderObject::title):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
LayoutTests:
* platform/mac/accessibility/aria-popup-buttons-on-native-elements-expected.txt: Added.
* platform/mac/accessibility/aria-popup-buttons-on-native-elements.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (98961 => 98962)
--- trunk/LayoutTests/ChangeLog 2011-11-01 15:16:14 UTC (rev 98961)
+++ trunk/LayoutTests/ChangeLog 2011-11-01 15:19:20 UTC (rev 98962)
@@ -1,3 +1,13 @@
+2011-11-01 Chris Fleizach <[email protected]>
+
+ AX: some popup buttons not announced by VoiceOver
+ https://bugs.webkit.org/show_bug.cgi?id=67743
+
+ Reviewed by Darin Adler.
+
+ * platform/mac/accessibility/aria-popup-buttons-on-native-elements-expected.txt: Added.
+ * platform/mac/accessibility/aria-popup-buttons-on-native-elements.html: Added.
+
2011-11-01 Andrey Kosyakov <[email protected]>
Unreviewed expectations update.
Added: trunk/LayoutTests/platform/mac/accessibility/aria-popup-buttons-on-native-elements-expected.txt (0 => 98962)
--- trunk/LayoutTests/platform/mac/accessibility/aria-popup-buttons-on-native-elements-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/aria-popup-buttons-on-native-elements-expected.txt 2011-11-01 15:19:20 UTC (rev 98962)
@@ -0,0 +1,22 @@
+Options Options Options
+This tests that native style buttons with aria-haspopup appear as popup buttons.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS button.role is 'AXRole: AXPopUpButton'
+PASS button.title is 'AXTitle: Options'
+PASS button.stringValue is 'AXValue: '
+PASS button.role is 'AXRole: AXPopUpButton'
+PASS button.title is 'AXTitle: Options'
+PASS button.stringValue is 'AXValue: '
+PASS button.role is 'AXRole: AXPopUpButton'
+PASS button.title is 'AXTitle: Options'
+PASS button.stringValue is 'AXValue: '
+PASS button.role is 'AXRole: AXPopUpButton'
+PASS button.title is 'AXTitle: Options'
+PASS button.stringValue is 'AXValue: '
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/platform/mac/accessibility/aria-popup-buttons-on-native-elements.html (0 => 98962)
--- trunk/LayoutTests/platform/mac/accessibility/aria-popup-buttons-on-native-elements.html (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/aria-popup-buttons-on-native-elements.html 2011-11-01 15:19:20 UTC (rev 98962)
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href=""
+<script>
+var successfullyParsed = false;
+</script>
+<script src=""
+</head>
+<body id="body">
+
+<a id="button1" tabindex="0" class="button" href="" aria-haspopup="true" role="button">Options</a>
+<span id="button2" class="button" tabindex="0" role="button" aria-haspopup="true">Options</span>
+
+<button id="button3" type="button" aria-haspopup="true">Options</button>
+<input id="button4" type="button" aria-haspopup="true" value="Options">
+
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+ description("This tests that native style buttons with aria-haspopup appear as popup buttons.");
+
+ if (window.accessibilityController) {
+
+ for (var k = 1; k < 5; k++) {
+
+ document.getElementById("button" + k).focus();
+ var button = accessibilityController.focusedElement;
+ shouldBe("button.role", "'AXRole: AXPopUpButton'");
+ shouldBe("button.title", "'AXTitle: Options'");
+
+ // Verify that the title is not duplicated as the AXValue
+ shouldBe("button.stringValue", "'AXValue: '");
+ }
+ }
+
+ successfullyParsed = true;
+</script>
+
+<script src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (98961 => 98962)
--- trunk/Source/WebCore/ChangeLog 2011-11-01 15:16:14 UTC (rev 98961)
+++ trunk/Source/WebCore/ChangeLog 2011-11-01 15:19:20 UTC (rev 98962)
@@ -1,3 +1,17 @@
+2011-11-01 Chris Fleizach <[email protected]>
+
+ AX: some popup buttons not announced by VoiceOver
+ https://bugs.webkit.org/show_bug.cgi?id=67743
+
+ Reviewed by Darin Adler.
+
+ Test: platform/mac/accessibility/aria-popup-buttons-on-native-elements.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::stringValue):
+ (WebCore::AccessibilityRenderObject::title):
+ (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
+
2011-11-01 Alexander Pavlov <[email protected]>
Web Inspector: [Styles] Style-based CSS properties are editable and toggleable
Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (98961 => 98962)
--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2011-11-01 15:16:14 UTC (rev 98961)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2011-11-01 15:19:20 UTC (rev 98962)
@@ -1163,9 +1163,6 @@
if (m_renderer->isListMarker())
return toRenderListMarker(m_renderer)->text();
- if (cssBox && cssBox->isRenderButton())
- return toRenderButton(m_renderer)->text();
-
if (isWebArea()) {
// FIXME: Why would a renderer exist when the Document isn't attached to a frame?
if (m_renderer->frame())
@@ -1300,7 +1297,7 @@
String AccessibilityRenderObject::title() const
{
- AccessibilityRole ariaRole = ariaRoleAttribute();
+ AccessibilityRole role = roleValue();
if (!m_renderer)
return String();
@@ -1320,24 +1317,29 @@
return input->value();
}
- if (isInputTag || AccessibilityObject::isARIAInput(ariaRole) || isControl()) {
+ if (isInputTag || AccessibilityObject::isARIAInput(ariaRoleAttribute()) || isControl()) {
HTMLLabelElement* label = labelForElement(static_cast<Element*>(node));
if (label && !titleUIElement())
return label->innerText();
}
- if (roleValue() == ButtonRole
- || ariaRole == ListBoxOptionRole
- || ariaRole == MenuItemRole
- || ariaRole == MenuButtonRole
- || ariaRole == RadioButtonRole
- || ariaRole == CheckBoxRole
- || ariaRole == TabRole
- || ariaRole == PopUpButtonRole
- || isHeading()
- || isLink())
+ switch (role) {
+ case ButtonRole:
+ case ListBoxOptionRole:
+ case MenuItemRole:
+ case MenuButtonRole:
+ case RadioButtonRole:
+ case CheckBoxRole:
+ case TabRole:
+ case PopUpButtonRole:
return textUnderElement();
+ default:
+ break;
+ }
+ if (isHeading() || isLink())
+ return textUnderElement();
+
return String();
}
@@ -3113,12 +3115,12 @@
if (m_renderer->isListMarker())
return ListMarkerRole;
if (node && node->hasTagName(buttonTag))
- return ButtonRole;
+ return ariaHasPopup() ? PopUpButtonRole : ButtonRole;
if (m_renderer->isText())
return StaticTextRole;
if (cssBox && cssBox->isImage()) {
if (node && node->hasTagName(inputTag))
- return ButtonRole;
+ return ariaHasPopup() ? PopUpButtonRole : ButtonRole;
return ImageRole;
}
if (node && node->hasTagName(canvasTag))
@@ -3140,12 +3142,9 @@
if (input->isRadioButton())
return RadioButtonRole;
if (input->isTextButton())
- return ButtonRole;
+ return ariaHasPopup() ? PopUpButtonRole : ButtonRole;
}
- if (node && node->hasTagName(buttonTag))
- return ButtonRole;
-
if (isFileUploadButton())
return ButtonRole;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes