Default focus should land on a non-destructive option, not on danger
Aliases: initial focus · focus on Cancel · destructive focus
What it is
When a dialog opens, keyboard focus, screen-reader focus, and sometimes a touch highlight sit on one button. That default focus should not sit on Delete, Empty, Unbind. It should sit on Cancel, Keep, or a constructive primary. Wherever focus is, the next Space, Enter, or switch activation hits. Giving focus to danger lends the platform’s “activate now” to the least reversible item.
Why it happens
People are still reading the title when the motor system is already lined up on the focus ring. Skilled users hit Space before the body is read. Default focus is that shortcut’s aim point. Habituation turns confirms into theatre—people have trained “popup, activate default.” If the default is danger, habituation destroys the data. A screen-reader user also hears that control first; “activate” without browsing hits it. Focus is also a visual recommendation: a danger item wearing the ring looks like the primary, even in a warning hue.
Studying it
Open a dialog with Delete and Cancel, press Space or Enter with no extra click. Compare focus on Delete, on Cancel, on the dialog container.
Independent variables: initial focus target, whether people are told to dismiss dialogs fast, screen-reader use. Dependent variables: accidental deletion, whether the title was heard before activation, habituation (accuracy drop across a chain of dialogs).
Warning people “this is dangerous” switches habituation off. Instruct them to work through a batch of confirms quickly, with a destructive one in the mix.
Where it stops holding
A notice with only Got it can only focus that. A form that must be filled should focus the first field, not any button. Some assistive users want focus on the title or container so the whole dialog is heard before Tab to buttons—safer than Delete, and stabler than skipping the title straight to Cancel. Confirm-attack in a game is a core loop and does not apply.
Applying it
- On opening a destructive dialog, put focus on Cancel or a safe option, not on Delete.
- A constructive dialog may focus the primary if that action is reversible or cheap.
- Do not use autofocus on a field to paper over button focus; design the two separately.
- Verify by opening a delete confirm from the keyboard only and pressing Space at once. If the object is gone, default focus was on danger.
Related
- Within the group: E1.18.2 Bottom sheets and centered dialogs may follow different button-order conventions · E1.18.3 The default button fired by Enter must not be a destructive action · E1.18.4 A cross-platform product should follow each OS’s order
- Adjacent: E1.03 Destructive action buttons · J3.02 Focus order and focus traps · E6.05 Confirmation dialogs
- Search terms:
initial focus·destructive default·dialog focus