AlertDialog
Ask for an explicit decision and initially focus the safer action.
alpina-ui/interactive/alert-dialogDraft in print queue.
Usage notes
Give the confirmation a specific action label. Initial focus goes to Cancel. Clicking the backdrop leaves the decision open.
When to use
Ask for an explicit decision before deleting a record or discarding work that cannot be recovered.
When to avoid
Routine saves and reversible display changes can proceed without interrupting the person.
Accessibility
State the consequence in the description. Keep the safe action reachable and return focus sensibly after cancellation or deletion.
| Key | Action |
|---|---|
| Enter / Space | Open the confirmation from its trigger. Initial focus goes to Cancel. |
| Tab / Shift+Tab | Move between actions within the modal. |
| Escape | Cancel and return focus to the trigger. |
Content
Name the object in the question and use an unambiguous verb for confirmation. Keep the consequence to one plain sentence.
- Use
- Delete draft invoice 104? / Delete draft
- Avoid
- Are you sure? / Yes
Copy in four languages
- German
- Entwurf löschen15 characters
- French
- Supprimer le brouillon22 characters
- Italian
- Elimina bozza13 characters
- Romansh
- Stizzar il sboz15 characters
npx --no-install alpina add alert-dialog