Bug 114071

Summary: AX: VoiceOver can't press on items
Product: WebKit Reporter: chris fleizach <cfleizach>
Component: AccessibilityAssignee: chris fleizach <cfleizach>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, commit-queue, dmazzoni, jdiggs, jer.noble, thorton, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
none
patch none

Description chris fleizach 2013-04-05 16:00:35 PDT
Now when I visit apple.com with WebKit Nightly I hear "AXScrollToVisible Lunch" when I Control-Option-space on a link
Comment 1 chris fleizach 2013-04-05 17:05:33 PDT
Created attachment 196702 [details]
patch
Comment 2 chris fleizach 2013-04-05 17:05:44 PDT
rdar://13580932
Comment 3 chris fleizach 2013-04-05 17:06:13 PDT
Adding Tim to help with review
Comment 4 Tim Horton 2013-04-05 17:10:59 PDT
Comment on attachment 196702 [details]
patch 

View in context: https://bugs.webkit.org/attachment.cgi?id=196702&action=review

> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:938
> -    static NSArray *defaultElementActions = [[NSArray alloc] initWithObjects:NSAccessibilityShowMenuAction, NSAccessibilityScrollToVisibleAction, nil];
> +    static NSArray *defaultElementActions = [[NSArray alloc] initWithObjects:NSAccessibilityShowMenuAction, scrollToVisibleAction, nil];
>  
>      // Action elements allow Press.
>      // 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];
> +    static NSArray *actionElementActions = [[NSArray alloc] initWithObjects:NSAccessibilityPressAction, NSAccessibilityShowMenuAction, scrollToVisibleAction, nil];

This is just *asking* for someone to come along and add something after scrollToVisibleAction and wonder why it doesn't work. Can we organize this differently somehow? Even if you split this line and put the ifdefs in the middle of it, that would seem better to me (we do that elsewhere).
Comment 5 chris fleizach 2013-04-05 17:27:50 PDT
Created attachment 196706 [details]
patch

good point. how does this look
Comment 6 Tim Horton 2013-04-05 17:29:03 PDT
Comment on attachment 196706 [details]
patch

That works too.
Comment 7 WebKit Commit Bot 2013-04-05 18:06:48 PDT
Comment on attachment 196706 [details]
patch

Clearing flags on attachment: 196706

Committed r147824: <http://trac.webkit.org/changeset/147824>
Comment 8 WebKit Commit Bot 2013-04-05 18:06:51 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Tim Horton 2013-04-08 12:02:46 PDT
Comment on attachment 196706 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=196706&action=review

> LayoutTests/platform/mac-future/accessibility/press-action-is-first-expected.txt:2
> +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.

Please don't land test results in mac-future.
Comment 10 chris fleizach 2013-04-08 12:10:53 PDT
(In reply to comment #9)
> (From update of attachment 196706 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=196706&action=review
> 
> > LayoutTests/platform/mac-future/accessibility/press-action-is-first-expected.txt:2
> > +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.
> 
> Please don't land test results in mac-future.

Should this be removed then
Comment 11 Jer Noble 2013-04-08 12:17:58 PDT
(In reply to comment #10)
> (In reply to comment #9)
> > (From update of attachment 196706 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=196706&action=review
> > 
> > > LayoutTests/platform/mac-future/accessibility/press-action-is-first-expected.txt:2
> > > +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.
> > 
> > Please don't land test results in mac-future.
> 
> Should this be removed then

I cleaned things up in r147943. <http://trac.webkit.org/changeset/147943>
Comment 12 chris fleizach 2013-04-08 12:24:43 PDT
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #9)
> > > (From update of attachment 196706 [details] [details] [details])
> > > View in context: https://bugs.webkit.org/attachment.cgi?id=196706&action=review
> > > 
> > > > LayoutTests/platform/mac-future/accessibility/press-action-is-first-expected.txt:2
> > > > +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.
> > > 
> > > Please don't land test results in mac-future.
> > 
> > Should this be removed then
> 
> I cleaned things up in r147943. <http://trac.webkit.org/changeset/147943>

Thanks