Accessibility · Middle · Question 7 of 75
Why can <button role="link"> be a bad idea?
- 1Browsers remove the
roleattribute from buttons - 2It announces a link but behaves like a button
- 3It breaks the button's CSS in most browsers
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.