Closed Bug 1767887 Opened 2 years ago Closed 2 years ago

[CTW] Paragraph boundary incorrect inside list items

Categories

(Core :: Disability Access APIs, defect)

defect

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

Details

(Whiteboard: [ctw-m2])

Attachments

(1 file)

STR:

  1. Open this test case:
    data:text/html,<ul><li><span>a</span><span>b</span></li></ul>
  2. Get the Accessible for the list item.
  3. Query the paragraph offsets at offset 2.
    • Expected: (2, 4)
    • Actual: (2, 3)

Every child of a list item is treated as a separate paragraph. The paragraph boundary works as expected outside of list items, though.

Impact: This makes reading with braille very messy in rich text editors like Google Docs if reading by paragraph is enabled, which is useful for braille.

The code checks whether the origin is inside the block, since if not, the block ends before the origin.
However, it previously didn't handle the case where there was a leaf outside the block between the block and the origin.
An additional check has now been added to handle this case.
This required the code to be restructured somewhat, which hopefully also makes it easier to read/debug.

Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/12e2556fc0b8
Fix TextLeafPoint paragraph boundary search for the second leaf Accessible and beyond after a block. r=morgan
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: