Accessibility · Middle · Question 29 of 75

When should you use role="switch" rather than a checkbox?

Show the answer

Correct answer: For an on/off setting that takes effect immediately

Explanation

A switch communicates on and off rather than checked. Use a native checkbox as a base when you can.

Further reading

Problem with a question

Accessibility · Middle · question 29

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