Closed
Bug 1487312
Opened 7 years ago
Closed 7 years ago
No accessibility semantics for mutations inside shadow DOM
Categories
(Core :: Disability Access APIs, defect, P3)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: Jamie, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
STR:
1. Open this test case:
data:text/html,<div id="host"></div><script>shadow = host.attachShadow({mode: 'open'}); setTimeout(function () { shadow.innerHTML = `<button>Go</button>`; }, 1000);</script>
2. Wait 1 second.
3. Look for the button in the Accessibility Inspector.
Expected: There should be a button with name "Go".
Actual: There is no button, only a text leaf.
It seems that the initial shadow tree gets populated correctly, but mutations do not.
Updated•7 years ago
|
Blocks: war-on-xbl
Assignee | ||
Comment 1•7 years ago
|
||
Similar problems in the past have been fixes of this kind:
GetParent() -> GetFlattenedTreeParent()
IsInUnComposedDoc() -> IsInComposedDoc()
etc.
For this particular issue:
https://searchfox.org/mozilla-central/rev/94e37e71ffbfd39e6ad73ebcda5d77cce8d341ae/accessible/generic/DocAccessible.cpp#1365
Looks wrong. aContainerNode is the ShadowRoot when we insert the <button>, you really want the host, which is aStartChildNode->GetFlattenedTreeParent().
Note that that code needs to deal with the flattened parent of the child nodes potentially being different (for example, for two different slots).
Also, looks like we don't create accessible stuff for display: contents, so you probably want to jump over those or something. Should be easy to test with a <slot>.
Assignee | ||
Comment 2•7 years ago
|
||
I can take a look at this, as long as somebody helps writing the tests :)
Assignee: nobody → emilio
Assignee | ||
Comment 3•7 years ago
|
||
The issue was specific to content insertion directly under a shadow root, the
rest should work (see bug 1427825 for the fix for other similar occurrences).
The removal of the aContainer argument follows the same pattern as bug 1442207.
Assignee | ||
Comment 4•7 years ago
|
||
Alex, review ping? I've added a test and such, I don't know if this fell off the radar or what not.
Flags: needinfo?(surkov.alexander)
Comment 5•7 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)
> Alex, review ping? I've added a test and such, I don't know if this fell off
> the radar or what not.
done, sorry for delay
Flags: needinfo?(surkov.alexander)
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/mozilla-inbound/rev/011cfa1666cb
Fix content insertion accessibility notifications in Shadow DOM. r=Jamie,surkov
Comment 7•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in
before you can comment on or make changes to this bug.
Description
•