# Action menus and dialogs

Action menus collect secondary commands. Dialogs interrupt the current task for focused information, input, or confirmation.

## Action menus

- Use for infrequent row, account, or contextual actions—not for selecting a form value.
- The trigger has an accessible name and exposes `aria-expanded` and `aria-haspopup="menu"`.
- Focus the first enabled item when opened from the keyboard.
- Support Arrow Up and Arrow Down, Home and End, Escape, and outside click.
- Separate destructive actions visually and place them last.
- Close after selection and return focus to the trigger.

## Dialog family

### Information or form dialog

Use for a focused task that cannot be completed comfortably inline. Give the dialog a visible title, optional description, and stable action footer.

### Neutral confirmation

Use for consequential but reversible actions such as archive or deactivate. The confirming action remains neutral.

### Destructive confirmation

Use only for irreversible deletion, revocation, or destructive replacement. The trigger is outlined danger; the final confirmation is filled danger.

## Behavior

- Trap focus while open and restore focus to the opener on close.
- Escape and the explicit Cancel action close a dismissible dialog.
- Clicking the scrim may close a simple dialog, but never use it as the only exit.
- Keep titles as questions or specific tasks. Explain the consequence in plain language.
- Disable repeated submission and retain the action label while loading.
