Closed
Bug 406069
Opened 17 years ago
Closed 17 years ago
nsIAccessibleText::GetTextAtOffset() not practical for getting the line at the caret
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
People
(Reporter: aaronlev, Assigned: aaronlev)
References
(Blocks 1 open bug, )
Details
(Keywords: access)
Attachments
(1 file, 3 obsolete files)
6.51 KB,
patch
|
ginnchen+exoracle
:
review+
damons
:
approval1.9+
|
Details | Diff | Splinter Review |
For a line that ends in text that wraps to a new line, a caret position at the end of that line has the same character offset as when the caret is at the start of the next line. This causes a problem when a screen reader wants to speak the line a user has moved to, or the current line. If the caret is at the end of the line, the screen reader ends up getting the offset for the next line and speaking the next line instead of the correct one. However, Mozilla knows internally which line the caret is on. The proposed solution for IA2 and ATK/AT-SPI is to allow a new magic value for char offsets. Currently -1 can be passed to indicate end of text Now, -2 would mean current caret position This would allow AT's to save on calls as well, because they usually are interested in what's at the caret position.
Assignee | ||
Updated•17 years ago
|
Assignee: nobody → aaronleventhal
Component: Build Config → Disability Access APIs
Product: Firefox → Core
QA Contact: build.config → accessibility-apis
Assignee | ||
Updated•17 years ago
|
Blocks: texta11y, fox3access
Assignee | ||
Comment 1•17 years ago
|
||
If anyone knows what the Gecko test for caret @ end of line would be, let me know, otherwise I'll experiment.
Assignee | ||
Comment 2•17 years ago
|
||
Attachment #290743 -
Attachment is obsolete: true
Comment 3•17 years ago
|
||
Am I correct that this would mean that if we query for the characterExtents of -2 and compare that with the characterExtents of two characters adjacent to the the caretOffset to decide which line is current? If this is the right understanding, aren't there boundary cases where this will fail, such as drop caps where there isn't text on the rest of the line of the drop cap?
Assignee | ||
Comment 4•17 years ago
|
||
You won't have to do that. If you just ask for the line at the caret using get_textAtOffset(-2,...) we'll give you the actual line the caret is on, instead of using the caret's offset into the hypertext.
Assignee | ||
Updated•17 years ago
|
Assignee | ||
Comment 5•17 years ago
|
||
Attachment #290744 -
Attachment is obsolete: true
Attachment #291468 -
Flags: review?(surkov.alexander)
Assignee | ||
Comment 7•17 years ago
|
||
Okay, that part is the same as from the previous obsolete patch. Do you need me to post a new one?
Assignee | ||
Comment 8•17 years ago
|
||
Attachment #291468 -
Attachment is obsolete: true
Attachment #291603 -
Flags: review?(ginn.chen)
Attachment #291468 -
Flags: review?(surkov.alexander)
Attachment #291603 -
Flags: review?(ginn.chen)
Attachment #291603 -
Flags: review+
Attachment #291603 -
Flags: approval1.9?
Updated•17 years ago
|
Attachment #291603 -
Flags: approval1.9? → approval1.9+
patch checked in.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•