dialog element

The native HTML element for dialogs; opened with showModal() it becomes an accessible modal with a backdrop and focus containment.

In more detail

It can also be opened with show(), which is not modal and does none of this. showModal() puts the dialog in the top layer above all other content, makes the page behind inert, closes on Escape while firing a cancel event, and returns focus to the previously focused element when it closes.

Related terms

Taught in

References