Skip to main content

2 docs tagged with "modal"

View all tags

Dialog in Practice

Go beyond the basics of the dialog element: the top layer, validating a form before it closes, closing rules (Escape, click outside, closedby, requestClose), focus return, scroll locking, optional animation, and how to choose between a dialog, a popover, and details. Includes a live rename dialog lab and a decision picker.

HTML Dialog Element

Learn the HTML dialog element: modal and non-modal dialogs, showModal() and close(), forms with method dialog, the returnValue, the backdrop, focus handling, closing with Escape or a click outside, alert dialogs, accessibility, security, and common mistakes, with live examples.