Accessibility · Junior · Question 57 of 75

Where should focus go when a modal dialog opens?

Show the answer

Correct answer: Into the dialog, and stay there until it closes

Explanation

If focus stays behind the modal, keyboard users tab through hidden content. showModal() moves focus and makes the rest of the page inert.

Further reading

Problem with a question

Accessibility · Junior · question 57

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