Lesson: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...

Share this lessonTweet (X) it

Invite a teammate to learn with you by sharing this lesson or dropping the link in your team chat.

Ready to try running tests for this lesson?