-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shadow DOM issue for color contrast rule #687
Comments
I tried it with Lighthouse on Chrome Canary which should be running a fairly recent version of axe and the only contrast warning I got was on Either way, I tried to put together a smaller repro test case to remove some variables. This is just a vanilla custom element with shadow dom using some of the styles from your app. I was able to get axe-coconut to fail on this so it seems like it could be used to debug. |
The problem here is that Essentially instead of simply doing a single call to |
@dylanb can't we use |
And right after I wrote my last comment, I understood why. If a shadow tree is on top of a background color, we won't pick up the entire stack. I'll try combining multiple stack arrays as a first attempt. |
* chore: move isShadowRoot to its own file * fix: add shadow dom support to color contrast rule Closes #687 * test(color): add tests, incorporate feedback * feat: move shadowElementsFromPoint to commons.dom * test: upgrade to circle 2.0 and try failing tests again
Co-authored-by: Steven Lambert <steven.lambert@deque.com> Co-authored-by: Dan Bjorge <dan.bjorge@deque.com>
axe-core is having trouble calculating color contrast inside of Shadow DOM, and it puts items into Needs Review for some reason. I've seen it occur for implicit labels with visually hidden text as well as buttons with visible text. I tested this with the latest dev build of aXe Coconut.
I believe @robdodson saw this issue a while back, too.
Example markup to populate within a shadow boundary (from my a11y-demo-app, uses React-Shadow):
The text was updated successfully, but these errors were encountered: