04
Content
- The title is the question or the task: "Revoke this API key?", "Edit profile".
- The description says what follows, plainly: "This can't be undone."
- Buttons are verbs: "Revoke key", never "OK" or "Yes".
A focused decision or a short task, over the page. Danger and warning ask before something happens.
<div role="dialog">Server-rendered01
02
dialog-title<h2>The question or the task; it names the dialog.dialog-description<p>A line under it; it describes the dialog.dialog-body<div>The content; it scrolls when the dialog is at its tallest.dialog-footer<div>The actions, end-aligned: the least destructive first.dialog-close<div>Close: last in the focus order, so focus lands on the content first.03
04