-
Notifications
You must be signed in to change notification settings - Fork 779
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
fix(color-contrast): correctly compute color contrast of <slot> elements #3847
Conversation
@@ -906,6 +906,29 @@ describe('color-contrast', function () { | |||
} | |||
); | |||
|
|||
(shadowSupported ? it : xit)('handles <slot> elements', () => { | |||
fixture.innerHTML = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't use shadowCheckSetup
because I needed the final node to be the paragraph, but trying to have the paragraph in the first parameter had the code add the shadow dom to it rather than the container element.
const shadowContainer = shadow.querySelector('#shadowContainer'); | ||
axe.testUtils.flatTreeSetup(fixture); | ||
|
||
const target = fixture.querySelector('#target'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't use axe.utils.querySelector
since the element is in the shadow dom in the virtual tree, so would need to select the shadow element and query selector from there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I fully understand the problem. Would like to get on a call to discuss.
Co-authored-by: Wilco Fiers <[email protected]>
…nts (#3847) * fix(color-contrast): correctly compute color contrast of <slot> elements * Update lib/commons/dom/create-grid.js Co-authored-by: Wilco Fiers <[email protected]> Co-authored-by: Wilco Fiers <[email protected]>
Closes: #3329