Cypress · Middle · Question 29 of 77

How can you add accessibility checks to Cypress tests?

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.

Further reading

Problem with a question

Cypress · Middle · question 29

Test yourself

Take the Cypress · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz