Closed Bug 1616078 Opened 4 years ago Closed 4 years ago

::marker contents appear duplicated in accessibility tree

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: Oriol, Assigned: Jamie)

References

Details

Attachments

(1 file)

Load

<style>
::marker { content: 'foo' counter(bar) }
</style>
<ol><li>text</li></ol>

Inspect the <li> in the accessibility tree.

Actual

▼ listitem      "foo0 foo 0 text"
    statictext  "foo0"
    statictext  "foo"
    statictext  "0"
    statictext  "text"

Expected: I guess something like

▼ listitem      "foo0 text"
    statictext  "foo0"
    statictext  "text"

or

▼ listitem      "foo 0 text"
    statictext  "foo0"
    statictext  "text"

or

▼ listitem      "foo0 text"
    statictext  "foo"
    statictext  "0"
    statictext  "text"

or

▼ listitem      "foo 0 text"
    statictext  "foo"
    statictext  "0"
    statictext  "text"

or similar.

This is also confirmed with NVDA. Moving this from the developer tools to the platform APIs component. Jamie, seems like our list item code is grabbing text too much too often. Question is how this is visually represented, what the result should be.

Component: Accessibility Tools → Disability Access APIs
Flags: needinfo?(jteh)
OS: Unspecified → All
Product: DevTools → Core
Hardware: Unspecified → All

The danger of me investigating an issue is that I end up patching it...

Assignee: nobody → jteh
Flags: needinfo?(jteh)

::marker content gets handled like text from any other CSS pseudo-class.
Therefore, using HTMLListBulletAccessible ends up duplicating the content already exposed in the a11y tree.
Now, we only use HTMLListBulletAccessible for nsBulletFrames instead of all marker frames.

As part of this, remove nsContainerFrame::GetSpokenMarkerContent, since we no longer need it to retrieve ::marker content.
The bulk of its other work was done by nsBulletFrame::GetSpokenContent, which we now call directly.
It also handled producing a default bullet character for list-style-image, but it makes sense for this to live in the a11y code.

Priority: -- → P2
Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d1704ff79f8f
Don't use HTMLListBulletAccessible for CSS ::marker content. r=eeejay,emilio,MarcoZ
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: