-
Notifications
You must be signed in to change notification settings - Fork 10
test(a11y): automates generation of component list for a11y testing #43
test(a11y): automates generation of component list for a11y testing #43
Conversation
Questions I have:
|
I'm getting various errors when I try to run the a11y script. Sometimes it's this:
And other times this:
Can you verify this is still working for you? |
And to answer your questions:
|
I get the asset size warning; if it is related to this branch it might be because when I updated pa11y the storybook version went to 6.5.9. The good news is that we can do something about bundle size as of 6.4. (https://storybook.js.org/blog/storybook-on-demand-architecture/). But that may be a separate ticket? The new pa11y was complaining about uncaught rejected promises. To get it to work, I refactored I'll leave the a11y.test.js file (a jest test) until that testing question is resolved. For what it's worth, we're pretty happy with a combination of Chromatic for visual tests and Cypress for functional tests. The newest version of Cypress has a components option I haven't explored yet. Cypress can run a11y/axe tests also, but so far the script here is a little easier to set up. I excluded two additional axe rules from reporting errors, Rule-ignoring could also be refactored - pa11y supports this directly now, but the script here was written to run all tests and filter out the ones from the a11y.config.js ignore list. There's no reason you can't pass the ignore parameter to pa11y in your local config of course. So this is an improvement, but more could be done:
|
➤ Callin Mullaney commented: Closing as A11y testing is part of Emulsify-Core integration and no longer needs it's own integration for Compound - https://github.com/emulsify-ds/emulsify-core/blob/main/config/a11y.config.js |
Summary
Implements automated accessibility testing from emulsify-drupal project in compound
This PR fixes/implements the following bugs/features
Explain the motivation for making this change. What existing problem does the pull request solve?
Components were moved out of emulsify-ds into this project. Accessibility testing for those components should also happen here.
Manually maintaining a list of components to test leads to coverage gaps. The existing tooling in Emulsify-ds does not report errors if a listed component does not exist, so components that are renamed are inadvertently removed from testing.
Documentation Update (required)
Accessibility testing is covered at https://docs.emulsify.info/emulsify-drupal/emulsify-drupal/advanced-usage/accessibility-testing but it could be moved to the Compound section.
How to review this PR
Closing issues
Closes #42