Modal dialog example
Open a dialog
Activate the button to open a modal dialog. Press Escape to close it.
What this demo includes
- Dialog is closed by default.
- Focus moves into the dialog when it opens, and returns to the opener when it closes.
- Keyboard support: Tab/Shift+Tab cycles within the dialog; Escape closes.