Repository navigation
test(e2e): check every widget state with axe in light, dark and RTL - #435
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The accessibility half of W7 (F-05 task 33).
e2e/tests/states.spec.tsputs the widget in each state from F-05's list that exists today and runs axe against every WCAG 2.2 A and AA rule, at any impact, in light, dark and right-to-left. That's 12 states and 36 tests.sendMessage(..., { open: false })welcomeBubble.delay: 0suggestions, then openrate_limitedwithretryAfterMscontext.setOffline(true)budget_exceededS8 (tool confirmation, F-08), S12 (handoff, F-10) and S17 (consent) don't exist yet and get added with those features.
All of them pass with no changes to the widget.
One thing I found on the way: axe skips the contrast of text that is still fading in. A first check with near-white text on white passed while the panel was opening. The spec now waits for the shadow root's animations to finish before each scan. I confirmed the same bad colors fail with that wait.
Also:
E2E_CHANNEL=chromein the Playwright config runs the browser tests in an installed Chrome, so contributors can skip the Chromium download. It's in CONTRIBUTING./api/chathas a knowledge source that only finds something for "with sources", so every other reply is unchanged.Screenshot baselines (the visual half of W7) come next. They need to be made on CI's Linux Chromium, since a Mac's rendering won't match.
Tested: the full e2e suite passes locally in Chrome (69 tests), and the states spec passes 180 of 180 runs with
--repeat-each=5. Lint fore2e/is unchanged from dev.