Closed Bug 1578311 Opened 5 years ago Closed 5 years ago

<br> not exposed to accessibility if at end of span

Categories

(Core :: Disability Access APIs, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

STR:

  1. Open this test case:
    data:text/html,l1<br>l2
  2. Right click the document and select Inspect Accessibility Properties.
  3. Examine the children of the document in the accessibility tree.
    • Observe: text leaf "l1", whitespace "\n", text leaf "l2".
  4. Open this test case:
    data:text/html,l1<span><br></span>l2
  5. Right click the document and select Inspect Accessibility Properties.
  6. Examine the children of the document in the accessibility tree.
    • Expected: text leaf "l1", whitespace "\n", text leaf "l2".
    • Actual: text leaf "l1", text leaf "l2". whitespace "\n" is missing.

Impact: "This bug makes it virtually impossible to properly read CI build logs on Gitlab [with NVDA], since many lines of output are squashed onto one line."
Originally reported as: https://github.com/nvaccess/nvda/issues/10143

This seems to have been done deliberately in order to fix bug 899433. (It was then re-implemented in bug 1250333.)
https://searchfox.org/mozilla-central/rev/e04021f29e6d8a37753ba2b510432315ce05a8d7/layout/generic/BRFrame.cpp#262
I think we're going to need to find an alternative fix for bug 899433 which doesn't involve pruning br accessibles.

Pruning these meant that <span><br></span> wasn't represented in the tree or rendered text at all.
This meant that lines were merged together in NVDA browse mode; e.g. in CI build logs on Gitlab.

The reason we started pruning these is that they were causing invalid line offsets to be returned for affected lines (bug 899433).
This patch also fixes this problem in HyperTextAccessible::FindOffset.

Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/641f1c8c0fd2
Don't prune a trailing HTML br child from the accessibility tree. r=eeejay
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Assignee: nobody → jteh
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: