dequelabs / dequelabs/axe-core
mark custom elements missing an open shadow for needs review if it fails a rule
- Dominant language
- JavaScript
- Stars
- 7.5k
- Forks
- 933
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 17
Description
If a custom element is picked up by a rule it can fail under two cases which probably shouldn't:
1. the element isn't defined in the `CustomElementRegistry`
1. the element is defined but uses a closed shadow root
It would be nice if axe-core detected these two cases and marked the element as needs review rather than fail it for any rule it fails.
We can easily detect the first case by using `CustomElement.get` to see if the element name has been defined. For the 2nd case, it might be safe enough to assume that if the element is defined but does not have content or an open shadow root, it has a closed shadow root and we should mark it for needs review as we can't tell for certain anything about the node.
Contributor guide
Assessment
This issue has not been assessed yet.