Testing · Middle · Question 31 of 75

What does toHaveAccessibleName check?

Explanation

Useful for icon buttons: <button aria-label="Close">×</button> must be announced as “Close”.

Further reading

Problem with a question

Testing · Middle · question 31

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