Accessibility · Senior · Question 24 of 75
What differs between dialog.show() and dialog.showModal()?
- 1Only
show()moves focus into the dialog when it's opened - 2Only
showModal()makes the page inert and uses the top layer - 3Only
show()lets the Esc key close the dialog for users
Show the answer
Correct answer: Only showModal() makes the page inert and uses the top layer
Explanation
show() is non-modal, so the rest of the page remains in use. Choose based on whether the task should block the page.