Accessibility · Junior · Question 71 of 75

How do you style a custom checkbox accessibly?

Show the answer

Correct answer: Keep a real input and style around it

Explanation

The native input keeps its focus, keyboard support and state. Visually hide it, or use appearance: none, and style the box. Check the focus style too.

Further reading

Problem with a question

Accessibility · Junior · question 71

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