Accessibility · Junior · Question 9 of 75

What is wrong with this control?

<div class="btn" onclick="save()">Save</div>
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.

Further reading

Problem with a question

Accessibility · Junior · question 9

Test yourself

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

Take this quiz