Accessibility · Junior · Question 9 of 75
What is wrong with this control?
<div class="btn" onclick="save()">Save</div>- 1The click handler runs twice in most modern browsers
- 2Keyboard and screen reader users can't use it properly
- 3The
classattribute is not allowed on adivelement
Show the answer
Correct answer: Keyboard and screen reader users can't use it properly
Explanation
A div isn't focusable, doesn't react to Enter or Space and has no role. Mouse users won't notice, so this bug often survives until someone tests with a keyboard.