Cypress · Middle · Question 29 of 77
How can you add accessibility checks to Cypress tests?
- 1Use
cypress-axeto run axe-core on the page - 2Run Cypress with the
--accessibleflag - 3Call the built-in
cy.a11y()command
Show the answer
Correct answer: Use cypress-axe to run axe-core on the page
Explanation
cy.injectAxe() then cy.checkA11y() reports violations like missing labels. Manual checks are still needed for others.