Testing · Middle · Question 70 of 75

How can automated accessibility checks be added to component tests?

const { container } = render(<Form />);
expect(await axe(container)).toHaveNoViolations();

Explanation

Automated tools find roughly a third of a11y problems; keyboard and screen-reader checks are still needed.

Further reading

Problem with a question

Testing · Middle · question 70

Test yourself

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

Take this quiz