Closed
Bug 1494196
Opened 6 years ago
Closed 2 years ago
Element with ARIA role and display: contents doesn't get an accessible
Categories
(Core :: Disability Access APIs, defect, P3)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
112 Branch
Tracking | Status | |
---|---|---|
firefox112 | --- | fixed |
People
(Reporter: Jamie, Assigned: nlapre)
References
(Blocks 1 open bug, Regressed 1 open bug)
Details
(Keywords: papercut)
Attachments
(1 file)
STR:
1. Open this test case:
data:text/html,<div role="list" style="display: contents;"><div role="listitem">foo</div></div>
2. Use the Accessibility Inspector to examine the tree.
Expected: document -> list -> list item
Actual: document -> list item
If a display: contents element has an ARIA role, we should create an accessible for it, just like we do for MarkupMap.
Reporter | ||
Comment 1•6 years ago
|
||
Notes about fixing this:
in nsAccessibilityService::CreateAccessible, at around line 1073, we have this block:
if (content->IsElement() && content->AsElement()->IsDisplayContents()) {
Within that block, we create accessibles for display: contents, but *only* if there is an entry in the MarkupMap. We must also create an accessible if there are ARIA attributes. I think we can use MustBeAccessible() for this, but it needs to be tweaked so it doesn't assume a frame.
For most cases, we just want a HyperTextAccessible. However, ARIA grids are a notable exception. There is a block of code around line 1195 which deals with this, starting with this code:
if (isARIATablePart && (!newAcc || newAcc->IsGenericHyperText())) {
We'll need to split that out (probably into a function) and use it in both places.
Updated•2 years ago
|
Severity: normal → S3
Assignee | ||
Comment 2•2 years ago
|
||
This revision modifies the logic in CreateAccessible such that we create
Accessibles for elements that have ARIA roles (other than presentation, none) or
other ARIA attributes, even if those elements have the display: contents style.
This revision also adds tests to verify the above.
Updated•2 years ago
|
Assignee: nobody → nlapre
Status: NEW → ASSIGNED
Pushed by nlapre@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d59b76766f0d
Create Accessible for elements with ARIA role, attributes and display: contents, r=Jamie
Comment 4•2 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
status-firefox112:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•