Skip to main content

4 docs tagged with "dialog"

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.

Focus Management

Learn how to move keyboard focus on purpose: how focus() and document.activeElement work, when to move focus (dialogs, deleted items, form errors, page changes), how to return focus, and how to avoid stealing it. Includes three live labs: a delete-and-lose-focus lab, a dialog focus lab, and a form error summary lab.

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.

Modern HTML: Built-In Features for Today's Web

Start learning modern HTML: how the HTML Living Standard works, how to tell which new features are safe to use, and how dialog, details, popover, template, slot, inert, lazy loading and web components replace code you used to write yourself. Includes a live browser feature check and an old-way-or-new-way matcher.