-
Notifications
You must be signed in to change notification settings - Fork 7
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
Automate WCAG testing #1577
Automate WCAG testing #1577
Conversation
- add new Github Action to run WCAG tests on push or pull request to develop, hotfix, and support branches - add pageNavigator, similar to theme's pageNavigator, which uses puppeteer API to automate browser nagivation. - use axe-core/puppeteer library to generate WCAG report on each page J=SLAP-1634 TEST=manual/auto - run 'npm run wcag' locally, and see that a wcag report is properly generated for each url, and listed out the violations to be addressed (should have another item(s) to do so) - testing github action on this pr..
@@ -0,0 +1,44 @@ | |||
|
|||
/** | |||
* Waits until the content of the page stops changing. |
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.
For my own edification, the goto
method does not wait until the DOM of the page is fully loaded? Instead of rolling our own wait here, could we use page.waitForNavigation()
? It's referenced a couple places:
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.
No, goto doesn't wait for content to be fully loaded. I think we tried that and with waitForNavigation/other waitFor approach before in theme and it didn't work well so we resolve it with our custom wait. I tested waitForNavigation out locally just now with different network and DOM content loaded options, it's always stuck on the first page.
…ch-ui into dev/automate-wcag-test
…ch-ui into dev/automate-wcag-test
1466842
to
89ff890
Compare
reporter: 'no-passes', | ||
runOnly: { | ||
type: 'tag', | ||
values: ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag2aaa'] |
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 would check with Rose, but I think currently we are only trying to meet WCAG AA compliance. (We can leave AAA in here for now, but when we go to address these concerns, we may want to bump down to just AA)
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.
will do
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.
Rose said Level AA for WCAG 2.0 and 2.1 should be good!
Maybe we should merge this PR into a feature branch rather than develop until we address the failures? If we merge into develop, every PR will fail to pass the tests |
IMO, I would rather we merge this in now. Long-lived feature branches can become cumbersome. Merge conflicts can arise, etc. You have to constantly rebase. Especially here. If we don't rebase constantly, then the WCAG checks wouldn't catch any new failures added in |
Makes sense. We'll just want to watch out for the boy who cried wolf so that we don't start ignoring tests because they are always failing. It doesn't look like warnings are a thing except for code annotations which probably isn't what we are looking for. |
## Version 1.12.0 ### Features - Allow search rate tracking (#1558) - Add support for setting and changing the visitor and passing it to answers-core (#1564) - Add support for the auth token that is passed in from the config (#1566) - Add an `environment` field to support consumer auth in Sandbox (#1597) - Allow components to override the beforeMount function (#1547) - Add distance to the card data and a function to format it (#1550) - WCAG updates (allow pagination with Enter (#1575), identify current page in navigation tab (#1576), update autocomplete screen reader support (#1578, #1579)) ### Changes - Update directAnswers component data to include the searcher (#1596) - Use custom alerts instead of window.alert (#1549) - Update Mapbox version to match the Theme (#1551) - Internal repo changes (#1562, #1577) ### Bugfixes - Fix console error which would appear on google maps (#1548) - Fix FAQ expansion when default is expanded (#1553) - Fix error for searches on page load with no businessId (#1561)
Note:
J=SLAP-1634
TEST=manual/auto
npm run wcag
locally, and see that a wcag report is properly generated for each url, and listed out the violations to be addressed.