-
Notifications
You must be signed in to change notification settings - Fork 38
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
Component accessibility testing #1352
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
…mponent-accessibility-testing
This comment was marked as outdated.
This comment was marked as outdated.
Another option you might want to explore is Cypress component testing. It is considered stable, unlike Playwright component testing (which is still experimental), so it's possible that you might be able to loop over components in cypress just fine. Definitely worth experimenting. If you run into similar limitations, then you can carry on with my suggestion above about using playwright e2e testing instead. Note: You'll have to use |
Added! |
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.
LGTM 🚀 working great both locally and in CI.
Now lets start fixing all reported violations in future PRs.
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.
Testing/playing around with this PR. If I understand correctly, we are running a pre-written script axe-core on all of our components? I am able to run the test, and it would tell me there are components that fail accessibility but doesn't specify how. Does it simply test for nevermind I just saw the exact test rules and descriptions! @xman343 @mayank99aria-label
on all components?
Anything I should add, or does the code look good to you? |
I'm not too well-versed in configurating modules and scripts so I'm just learning from your code :D But I have read them and I think they look good. Also tested functionality and seems to be working as expected 👍 |
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.
fyi i updated this because visual tests were failing even after retrying 7 times.
Changes
Adding a Cypress script that tests all the components in the
examples
folder for accessibility violations usingcypress-axe
.Testing
To run all tests headlessly:
yarn test --filter=a11y
from root.To run interactively inside browser (locally):
yarn workspace a11y open
.Docs
N/A