Accessibility · Middle · Question 7 of 75

Why can <button role="link"> be a bad idea?

Show the answer

Correct answer: It announces a link but behaves like a button

Explanation

A role overrides the native semantics without changing behaviour, so users hear one thing and get another. Choose the element that matches the behaviour.

Further reading

Problem with a question

Accessibility · Middle · question 7

Test yourself

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

Take this quiz