This demo shows the cypress-axe plugin which can run the Axe-core library against the webpage to check if the page follows accessibility practices.
The tests are in cypress/e2e folder.
- The passing-spec.cy.js loads local index.html with high contrast text, which passes A11y checks
- The failing-spec.cy.js loads local index-bad.html with low contrast text, failing the checks
Note: the actual failures are printed in the DevTools console
- Watch this live pair programming session that shows a Gatsby.js site being tested using
cypress-axe