Diff
Modified: trunk/LayoutTests/ChangeLog (145115 => 145116)
--- trunk/LayoutTests/ChangeLog 2013-03-07 20:03:45 UTC (rev 145115)
+++ trunk/LayoutTests/ChangeLog 2013-03-07 20:04:22 UTC (rev 145116)
@@ -1,3 +1,13 @@
+2013-03-07 Chris Fleizach <cfleiz...@apple.com>
+
+ AX: Can't activate links with VoiceOver in Safari
+ https://bugs.webkit.org/show_bug.cgi?id=111755
+
+ Reviewed by Tim Horton.
+
+ * platform/mac/accessibility/press-action-is-first-expected.txt: Added.
+ * platform/mac/accessibility/press-action-is-first.html: Added.
+
2013-03-07 Rafael Weinstein <rafa...@chromium.org>
Unreviewed, rolling out r145083.
Added: trunk/LayoutTests/platform/mac/accessibility/press-action-is-first-expected.txt (0 => 145116)
--- trunk/LayoutTests/platform/mac/accessibility/press-action-is-first-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/press-action-is-first-expected.txt 2013-03-07 20:04:22 UTC (rev 145116)
@@ -0,0 +1,12 @@
+
+This tests that the AXPressAction comes first for activatable items instead of the scroll to visible action. This is needed for screenreaders to operate correctly.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Button supported actions: AXPress,AXShowMenu,AXScrollToVisible
+Link supported actions: AXPress,AXShowMenu,AXScrollToVisible
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/platform/mac/accessibility/press-action-is-first.html (0 => 145116)
--- trunk/LayoutTests/platform/mac/accessibility/press-action-is-first.html (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/press-action-is-first.html 2013-03-07 20:04:22 UTC (rev 145116)
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body id="body">
+
+<div id="group">
+
+<a href="" id="link1">link1</a><br>
+<button id="button1">button</button>
+
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests that the AXPressAction comes first for activatable items instead of the scroll to visible action. This is needed for screenreaders to operate correctly.");
+
+ if (window.accessibilityController) {
+
+ var button = accessibilityController.accessibleElementById("button1");
+ debug("Button supported actions: " + button.supportedActions);
+
+ var link = accessibilityController.accessibleElementById("link1");
+ debug("Link supported actions: " + link.supportedActions);
+
+ document.getElementById("group").style.visibility = "hidden";
+ }
+
+</script>
+
+<script src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (145115 => 145116)
--- trunk/Source/WebCore/ChangeLog 2013-03-07 20:03:45 UTC (rev 145115)
+++ trunk/Source/WebCore/ChangeLog 2013-03-07 20:04:22 UTC (rev 145116)
@@ -1,3 +1,18 @@
+2013-03-07 Chris Fleizach <cfleiz...@apple.com>
+
+ AX: Can't activate links with VoiceOver in Safari
+ https://bugs.webkit.org/show_bug.cgi?id=111755
+
+ Reviewed by Tim Horton.
+
+ VoiceOver is relying on the press action being the first action in the list. We changed
+ that order inadvertently recently, which confuses VoiceOver.
+
+ Test: platform/mac/accessibility/press-action-is-first.html
+
+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+ (-[WebAccessibilityObjectWrapper accessibilityActionNames]):
+
2013-03-07 Rafael Weinstein <rafa...@chromium.org>
Unreviewed, rolling out r145083.
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (145115 => 145116)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2013-03-07 20:03:45 UTC (rev 145115)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2013-03-07 20:04:22 UTC (rev 145116)
@@ -927,7 +927,8 @@
static NSArray *defaultElementActions = [[NSArray alloc] initWithObjects:NSAccessibilityShowMenuAction, NSAccessibilityScrollToVisibleAction, nil];
// Action elements allow Press.
- static NSArray *actionElementActions = [[defaultElementActions arrayByAddingObject:NSAccessibilityPressAction] retain];
+ // The order is important to VoiceOver, which expects the 'default' action to be the first action. In this case the default action should be press.
+ static NSArray *actionElementActions = [[NSArray alloc] initWithObjects:NSAccessibilityPressAction, NSAccessibilityShowMenuAction, NSAccessibilityScrollToVisibleAction, nil];
// Menu elements allow Press and Cancel.
static NSArray *menuElementActions = [[actionElementActions arrayByAddingObject:NSAccessibilityCancelAction] retain];
Modified: trunk/Tools/ChangeLog (145115 => 145116)
--- trunk/Tools/ChangeLog 2013-03-07 20:03:45 UTC (rev 145115)
+++ trunk/Tools/ChangeLog 2013-03-07 20:04:22 UTC (rev 145116)
@@ -1,3 +1,18 @@
+2013-03-07 Chris Fleizach <cfleiz...@apple.com>
+
+ AX: Can't activate links with VoiceOver in Safari
+ https://bugs.webkit.org/show_bug.cgi?id=111755
+
+ Reviewed by Tim Horton.
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (supportedActionsCallback):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ (AccessibilityUIElement):
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::supportedActions):
+
2013-03-07 Roger Fong <roger_f...@apple.com>
Windows debug layout tests are crashing like crazy again.
Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp (145115 => 145116)
--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp 2013-03-07 20:03:45 UTC (rev 145115)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp 2013-03-07 20:04:22 UTC (rev 145116)
@@ -1060,6 +1060,14 @@
#endif // PLATFORM(IOS)
+#if PLATFORM(MAC) && !PLATFORM(IOS)
+static JSValueRef supportedActionsCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> valueString(Adopt, toAXElement(thisObject)->supportedActions());
+ return JSValueMakeString(context, valueString.get());
+}
+#endif
+
// Implementation
// Unsupported methods on various platforms.
@@ -1237,6 +1245,9 @@
{ "iphoneElementTextLength", getIPhoneElementTextLengthCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "stringForSelection", stringForSelectionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
#endif // PLATFORM(IOS)
+#if PLATFORM(MAC) && !PLATFORM(IOS)
+ { "supportedActions", supportedActionsCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+#endif
{ 0, 0, 0, 0 }
};
Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.h (145115 => 145116)
--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.h 2013-03-07 20:03:45 UTC (rev 145115)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.h 2013-03-07 20:04:22 UTC (rev 145116)
@@ -255,6 +255,11 @@
void assistiveTechnologySimulatedFocus();
#endif // PLATFORM(IOS)
+#if PLATFORM(MAC) && !PLATFORM(IOS)
+ // Returns an ordered list of supported actions for an element.
+ JSStringRef supportedActions();
+#endif
+
private:
static JSClassRef getJSClass();
PlatformUIElement m_element;
Modified: trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm (145115 => 145116)
--- trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm 2013-03-07 20:03:45 UTC (rev 145115)
+++ trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm 2013-03-07 20:04:22 UTC (rev 145116)
@@ -1437,6 +1437,16 @@
#endif // SUPPORTS_AX_TEXTMARKERS
+JSStringRef AccessibilityUIElement::supportedActions()
+{
+ BEGIN_AX_OBJC_EXCEPTIONS
+ NSArray *names = [m_element accessibilityActionNames];
+ return [[names componentsJoinedByString:@","] createJSStringRef];
+ END_AX_OBJC_EXCEPTIONS
+
+ return 0;
+}
+
void AccessibilityUIElement::scrollToMakeVisible()
{
BEGIN_AX_OBJC_EXCEPTIONS