Bug 41810

Summary: AX: TextArea should return AXSelectedTextRange of 0,0 if the cursor is not in the text area
Product: WebKit Reporter: chris fleizach <cfleizach>
Component: AccessibilityAssignee: chris fleizach <cfleizach>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch darin: review+

Description chris fleizach 2010-07-07 16:19:51 PDT
A text area in a webpage will return a null value for AXSelectedTextRange if the cursor is not in the text range. It should return a text range of 0,0 instead

Here's webkit
   AXSelectedText (W):  ""
   AXSelectedTextRange (W):  "(null)"

here's TextEdit
   AXSelectedText (W):  ""
   AXSelectedTextRange (W):  "pos=0 len=0"
Comment 1 chris fleizach 2010-07-07 16:25:24 PDT
Created attachment 60799 [details]
Patch
Comment 2 Darin Adler 2010-07-07 17:41:45 PDT
Comment on attachment 60799 [details]
Patch

Is this better? It returns the same value it would if the insertion point was at the start of the text area. It seems to me that a blinking insertion point is different from not having selection at all.

r=me
Comment 3 chris fleizach 2010-07-07 17:56:37 PDT
(In reply to comment #2)
> (From update of attachment 60799 [details])
> Is this better? It returns the same value it would if the insertion point was at the start of the text area. It seems to me that a blinking insertion point is different from not having selection at all.
> 
> r=me

This matches TextEdit and Cocoa behavior. I had come across a VoiceOver bug a while ago that was relying on this value not being nil. When nil is returned, that usually propagates back a AX error. I think we should match Cocoa behavior in this case.
Comment 4 chris fleizach 2010-07-07 18:04:35 PDT
http://trac.webkit.org/changeset/62735