Changeset 145116 in webkit


Ignore:
Timestamp:
Mar 7, 2013, 12:04:22 PM (12 years ago)
Author:
Chris Fleizach
Message:

AX: Can't activate links with VoiceOver in Safari
https://bugs.webkit.org/show_bug.cgi?id=111755

Reviewed by Tim Horton.

Source/WebCore:

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]):

Tools:

  • DumpRenderTree/AccessibilityUIElement.cpp:

(supportedActionsCallback):
(AccessibilityUIElement::getJSClass):

  • DumpRenderTree/AccessibilityUIElement.h:

(AccessibilityUIElement):

  • DumpRenderTree/mac/AccessibilityUIElementMac.mm:

(AccessibilityUIElement::supportedActions):

LayoutTests:

  • platform/mac/accessibility/press-action-is-first-expected.txt: Added.
  • platform/mac/accessibility/press-action-is-first.html: Added.
Location:
trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r145115 r145116  
     12013-03-07  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: Can't activate links with VoiceOver in Safari
     4        https://bugs.webkit.org/show_bug.cgi?id=111755
     5
     6        Reviewed by Tim Horton.
     7
     8        * platform/mac/accessibility/press-action-is-first-expected.txt: Added.
     9        * platform/mac/accessibility/press-action-is-first.html: Added.
     10
    1112013-03-07  Rafael Weinstein  <rafaelw@chromium.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r145115 r145116  
     12013-03-07  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: Can't activate links with VoiceOver in Safari
     4        https://bugs.webkit.org/show_bug.cgi?id=111755
     5
     6        Reviewed by Tim Horton.
     7
     8        VoiceOver is relying on the press action being the first action in the list. We changed
     9        that order inadvertently recently, which confuses VoiceOver.
     10
     11        Test: platform/mac/accessibility/press-action-is-first.html
     12
     13        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
     14        (-[WebAccessibilityObjectWrapper accessibilityActionNames]):
     15
    1162013-03-07  Rafael Weinstein  <rafaelw@chromium.org>
    217
  • trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm

    r144911 r145116  
    928928
    929929    // Action elements allow Press.
    930     static NSArray *actionElementActions = [[defaultElementActions arrayByAddingObject:NSAccessibilityPressAction] retain];
     930    // 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.
     931    static NSArray *actionElementActions = [[NSArray alloc] initWithObjects:NSAccessibilityPressAction, NSAccessibilityShowMenuAction, NSAccessibilityScrollToVisibleAction, nil];
    931932
    932933    // Menu elements allow Press and Cancel.
  • trunk/Tools/ChangeLog

    r145110 r145116  
     12013-03-07  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: Can't activate links with VoiceOver in Safari
     4        https://bugs.webkit.org/show_bug.cgi?id=111755
     5
     6        Reviewed by Tim Horton.
     7
     8        * DumpRenderTree/AccessibilityUIElement.cpp:
     9        (supportedActionsCallback):
     10        (AccessibilityUIElement::getJSClass):
     11        * DumpRenderTree/AccessibilityUIElement.h:
     12        (AccessibilityUIElement):
     13        * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
     14        (AccessibilityUIElement::supportedActions):
     15
    1162013-03-07  Roger Fong  <roger_fong@apple.com>
    217
  • trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp

    r144657 r145116  
    10601060
    10611061#endif // PLATFORM(IOS)
     1062
     1063#if PLATFORM(MAC) && !PLATFORM(IOS)
     1064static JSValueRef supportedActionsCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
     1065{
     1066    JSRetainPtr<JSStringRef> valueString(Adopt, toAXElement(thisObject)->supportedActions());
     1067    return JSValueMakeString(context, valueString.get());
     1068}
     1069#endif
    10621070
    10631071// Implementation
     
    12381246        { "stringForSelection", stringForSelectionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    12391247#endif // PLATFORM(IOS)
     1248#if PLATFORM(MAC) && !PLATFORM(IOS)
     1249        { "supportedActions", supportedActionsCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     1250#endif
    12401251        { 0, 0, 0, 0 }
    12411252    };
  • trunk/Tools/DumpRenderTree/AccessibilityUIElement.h

    r145014 r145116  
    256256#endif // PLATFORM(IOS)
    257257
     258#if PLATFORM(MAC) && !PLATFORM(IOS)
     259    // Returns an ordered list of supported actions for an element.
     260    JSStringRef supportedActions();
     261#endif
     262   
    258263private:
    259264    static JSClassRef getJSClass();
  • trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm

    r144237 r145116  
    14381438#endif // SUPPORTS_AX_TEXTMARKERS
    14391439
     1440JSStringRef AccessibilityUIElement::supportedActions()
     1441{
     1442    BEGIN_AX_OBJC_EXCEPTIONS
     1443    NSArray *names = [m_element accessibilityActionNames];
     1444    return [[names componentsJoinedByString:@","] createJSStringRef];
     1445    END_AX_OBJC_EXCEPTIONS
     1446
     1447    return 0;
     1448}
     1449
    14401450void AccessibilityUIElement::scrollToMakeVisible()
    14411451{
Note: See TracChangeset for help on using the changeset viewer.