User control and freedom
Giving people a clear way to cancel, go back, close, or undo so one wrong click never traps them in a flow or permanent result.
See it
What it is
User control and freedom is Nielsen's third usability heuristic: people often choose something by accident and need a clearly marked way out without finishing the unwanted flow. Cancel, Back, Close, Escape, Undo, and Redo are the practical vocabulary. Nielsen calls the exit an emergency exit because it must be easy to find under pressure. Gmail's Undo Send is the pattern at its best: a window of five to thirty seconds, set by the user, in which a sent message goes back to being a draft.
Reach for it whenever the interface changes state, takes over attention, or starts a multi-step process. Modals close with a visible button and Escape, onboarding can be skipped, wizards preserve data when moving back, and reversible actions offer undo near the result.
The gotcha is fake freedom. A Back button that clears the form, a Cancel link that still submits, or an undo toast that disappears before it can be reached only adds anxiety. Preserve work by default, warn only when leaving would truly discard something, and never make the safer exit harder to see than the primary action.
Ask AI for it
Add user control and freedom to this multi-step flow. Give every step a Back button that preserves entered values, a visible Cancel action, and a final review before commit. Implement the modal with the native HTML dialog element, close it on Escape and its close button, and return focus to the opener. Push each completed step into the History API so the browser Back button follows the same path. After any reversible mutation, show an Undo action that remains keyboard reachable for at least 10 seconds; confirm only when exiting would discard unsaved work.