Bug 41810 - AX: TextArea should return AXSelectedTextRange of 0,0 if the cursor is not in the text area
Summary: AX: TextArea should return AXSelectedTextRange of 0,0 if the cursor is not in...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: chris fleizach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-07 16:19 PDT by chris fleizach
Modified: 2010-07-07 18:04 PDT (History)
1 user (show)

See Also:


Attachments
Patch (5.78 KB, patch)
2010-07-07 16:25 PDT, chris fleizach
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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