DOM Matchers - Accessibility

Testing for accessibility properties is important. Once they're in a test file, it is harder to accidentally remove them or break them.

It isn't perfect, as testing for accessibility has a lot of nuance. But there are a bunch of matchers that you can use.

Lesson covers:

toHaveAccessibleDescription(), toHaveAccessibleErrorMessage(), toHaveAccessibleName(), toHaveRole()

Loading full lesson content & code...

Ready to try running tests for this lesson?