

Require a focused response
Use Dialog for a concise decision or short task that needs attention before the page can continue.
aidsgn-dialog presents a focused decision or short task in the native modal top layer. The browser owns focus containment, Escape behavior, background inertness, and focus restoration.
<aidsgn-dialog id="delete-dialog" heading="Delete project"><dialog class="aidsgn-modal aidsgn-dialog" aria-labelledby="dialog-heading"> <div class="aidsgn-modal__surface"><header class="aidsgn-modal__header"><h2 class="aidsgn-modal__heading" id="dialog-heading">Delete project</h2><button class="aidsgn-modal__close" type="button" aria-label="Close dialog">×</button></header><div class="aidsgn-modal__body"><p>This action cannot be undone.</p><form method="dialog" data-aidsgn-modal-actions><button value="cancel">Cancel</button><button value="delete">Delete project</button></form></div></div></dialog></aidsgn-dialog>Set open declaratively or call show(). Call close(returnValue) to dismiss it programmatically. Author the native dialog heading and close button; close-label localizes that control.
Clicking the close button or backdrop, pressing Escape, and submitting a descendant <form method="dialog"> close the modal. aidsgn-close bubbles with its reason and native returnValue. Prevent the cancelable aidsgn-cancel event only when Escape would discard important work.
Holding the authored close button applies shared Press feedback without changing its 44px target. Reduced motion suppresses the scale.
Dialog is centered and bounded by --aidsgn-dialog-max-inline-size, which defaults to 36rem. Long content scrolls inside the body while the header remains visible.


Use Dialog for a concise decision or short task that needs attention before the page can continue.


Provide a clear heading and move initial focus to a useful control inside the Dialog.


Keep supporting information in the page flow when it does not need to interrupt the current task.


Open one Dialog at a time and retain a visible dismissal path so people can leave predictably.