Update AccessibilityUtils to better handle shadow DOM
Categories
(Core :: Disability Access APIs, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox122 | --- | fixed |
People
(Reporter: ayeddi, Assigned: Jamie)
References
Details
Attachments
(1 file)
Example in the trunk and the log: the synthesizeMouseAtCenter event on the <slot>
It also would likely to need to walk the flat tree in findInteractiveAccessible
| Assignee | ||
Comment 1•1 year ago
|
||
First, if a click is synthesised at the centre of a custom element containing a slot, the click might target a text node which is a child of the slot.
In that case, the composedTarget for the click event will be the slot, since click events on text nodes are retargeted to the parent node.
The slot itself isn't rendered, so we were returning early due to the 0 bounds check, hiding potential failures.
To fix this, walk to the slot's flattened tree parent.
Second, if a click occurs on a node which doesn't have an Accessible, we try to walk to the nearest Accessible ancestor.
If the node is in shadow DOM, the nearest Accessible might be outside of the shadow DOM.
Previously, we would stop at the shadow root.
Now, we walk flattened tree parents, which will walk us out of the shadow root.
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
Comment 3•1 year ago
|
||
| bugherder | ||
Description
•