Skip to content
UX Atlas
HeuristicExpert heuristicFoundational

Error Prevention

Better than a good error message is a design in which the error cannot occur.

Definition

Nielsen's fifth heuristic. Eliminate error-prone conditions, or check for them and present the user with a confirmation before they commit. Prevention operates on both slips, which are execution failures, and mistakes, which are planning failures.

Expert heuristic. A review criterion developed by practitioners. Useful and widely taught, but evaluated by judgement rather than measurement.

On this page
  1. Definition
  2. Slips and mistakes need different fixes
  3. Prevention techniques, strongest first
  4. In practice
  5. Sources
  6. Continue from here

Slips and mistakes need different fixes

Norman's distinction is load-bearing here. A slip is doing the wrong thing while intending the right thing, such as tapping the adjacent button. A mistake is doing the intended thing where the intention was wrong, such as deleting the correct file believing it was a duplicate.

Slips are prevented by physical design: bigger targets, more spacing, separation of destructive from frequent actions. Mistakes are prevented by information: better labels, previews, and showing consequences before commitment.

Prevention techniques, strongest first

  • Remove the possibility. Do not offer a state the system cannot honour.
  • Constrain the input. A date picker cannot produce the 31st of February.
  • Use good defaults, so the common case needs no decision.
  • Separate destructive from frequent actions in space and in style.
  • Validate in real time on the field, with helpful text before submission rather than a red wall after it.
  • Preview the consequence, such as showing what will be deleted and how many items that is.
  • Confirm only what is genuinely irreversible.

In practice

Disabling unavailable dates

Booking

A calendar that greys out unavailable dates removes an entire error class. The user cannot select a date that will be rejected, so the rejection message never has to exist.

Separating destructive actions

File management

Placing delete in an overflow menu rather than adjacent to a frequently used action removes the most common slip in list interfaces at zero cost to discoverability.

Sources

Where a source establishes something narrower than the popular reading of it, the note says so.

Each link says what the connection is, so you can tell a principle from an alternative from a thing people mix this up with.

Applies when you are designing

Applied through

Where this shows up as a concrete interface decision.

Check your work

Review passes that test whether this was done properly.

Related concept

Connected closely enough to change how you apply this.