Cannot get line of text via get_text_at_offset() due to generated character at end of line
Categories
(Core :: Disability Access APIs, defect, P3)
Tracking
()
People
(Reporter: jdiggs, Unassigned)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
324 bytes,
text/html
|
Details |
Steps to reproduce:
-
Launch the attached test case
-
Launch Accerciser and use it to select the accessible link
-
In Accerciser's iPython console, type the following:
acc.queryText().getTextAtOffset(0, TEXT_BOUNDARY_LINE_START)
Expected results: A valid string, a valid start offset, and a valid end offset.
Actual results: '', 0, 0
Impact: Orca cannot get the line using the API intended for this purpose. Instead it has to employ hacks to sort out what's on the line. Hacks are non-performant and prone to bugs. :(
Note: It's not broken for word; just line:
acc.queryText().getTextAtOffset(0, TEXT_BOUNDARY_WORD_START)
returns: 'Start ', 0, 6
Comment 1•5 years ago
|
||
Further distilled test case:
data:text/html,<style>p:after { content: 'c' };</style><p>ab</p>
This does seem to affect words in a different way as well, but only if the generated content would be treated as part of the word. In this example:
Word at offsets 0 and 1 return (0, 2, 'ab')
Word at offset 2 returns (0, 3, 'abc')
Comment 2•4 years ago
|
||
(In reply to James Teh [:Jamie] from comment #1)
Further distilled test case:
data:text/html,<style>p:after { content: 'c' };</style><p>ab</p>
This still returns (0, 0, none) for all 3 offsets 0 to 2 if called with line offset boundary, after bug 1670541.
This does seem to affect words in a different way as well, but only if the generated content would be treated as part of the word. In this example:
Word at offsets 0 and 1 return (0, 2, 'ab')
Word at offset 2 returns (0, 3, 'abc')
After your word boundary fixes, this always returns (0, 3, 'abc').
Comment 3•2 years ago
|
||
I can't reproduce this any more, with or without CTW.
Description
•