Accessibility · Junior · Question 57 of 75
Where should focus go when a modal dialog opens?
- 1Nowhere, it should stay on the page below
- 2To the top of the page behind the open dialog
- 3Into the dialog, and stay there until it closes
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.