Bug 131402

Summary: AX: Initial text selection point should respect element focus.
Product: WebKit Reporter: Samuel White <samuel_white>
Component: AccessibilityAssignee: Samuel White <samuel_white>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, cfleizach, commit-queue, dmazzoni, jcraig, jdiggs, mario, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.9   
Attachments:
Description Flags
Patch for EWS.
none
Patch. cfleizach: review+

Description Samuel White 2014-04-08 15:47:54 PDT
When AX is running and we have no selection, pressing an arrow key initializes selection to the beginning of the document. Initial selection should respect and key off of the focused element if one is present. This would make it possible for a user to navigate halfway down a page using tab, and then hit an arrow key to start reading text from that point.
Comment 1 Radar WebKit Bug Importer 2014-04-08 15:48:32 PDT
<rdar://problem/16558855>
Comment 2 Samuel White 2014-04-08 15:51:07 PDT
Created attachment 228904 [details]
Patch for EWS.

No review needed. Just running through EWS.
Comment 3 Samuel White 2014-04-08 16:08:25 PDT
Created attachment 228906 [details]
Patch.

Might as well update logs. :)
Comment 4 chris fleizach 2014-04-09 11:41:13 PDT
Comment on attachment 228906 [details]
Patch.

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

> LayoutTests/platform/mac/accessibility/selection-initial.html:88
> +        //

This should just be one line I think

> LayoutTests/platform/mac/accessibility/selection-initial.html:131
> +        //

ditto

> Source/WebCore/page/EventHandler.cpp:3049
> +static void setKeyboardSelection(Frame& frame, SelectionDirection direction)

should this be setInitialKeyboardSelection

> Source/WebCore/page/EventHandler.cpp:3052
> +

you can remove this empty line

> Source/WebCore/ChangeLog:10
> +        Added function to set initial selection more gracefully. Specifically, when accessibility has the need to set initial selection,

move this explanation above the line about "No New Tests'

This should say something like
"Support the case where we want to set the initial selection and there's already a focused element."
The current wording is a bit backward in terms of importance
Comment 5 Samuel White 2014-04-09 14:14:47 PDT
(In reply to comment #4)
> (From update of attachment 228906 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=228906&action=review
> 
> > LayoutTests/platform/mac/accessibility/selection-initial.html:88
> > +        //
> 
> This should just be one line I think
> 
> > LayoutTests/platform/mac/accessibility/selection-initial.html:131
> > +        //
> 
> ditto
> 
> > Source/WebCore/page/EventHandler.cpp:3049
> > +static void setKeyboardSelection(Frame& frame, SelectionDirection direction)
> 
> should this be setInitialKeyboardSelection
> 
> > Source/WebCore/page/EventHandler.cpp:3052
> > +
> 
> you can remove this empty line
> 
> > Source/WebCore/ChangeLog:10
> > +        Added function to set initial selection more gracefully. Specifically, when accessibility has the need to set initial selection,
> 
> move this explanation above the line about "No New Tests'
> 
> This should say something like
> "Support the case where we want to set the initial selection and there's already a focused element."
> The current wording is a bit backward in terms of importance

Addressed all feedback and committed manually. Thanks.
Comment 6 Samuel White 2014-04-09 14:15:15 PDT
http://trac.webkit.org/changeset/167033