Skip to content
UX Atlas
UX writingExpert heuristicFoundational

Error Messages

Say what happened, why if you know, and what to do next, in that order and in plain language.

Definition

An error message explains a failed operation and offers a route forward. Its quality determines whether a failure becomes a recovered task or an abandoned session.

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. Writing them
  3. Placement and semantics
  4. Continue from here

Writing them

Do

  • Name the specific problem: 'This email address is already registered'.
  • Offer the action inline: a sign-in link, a retry button, a way to change the value.
  • Use plain words: declined, expired, unavailable, too large.
  • Say what is preserved: 'Your draft is saved'.
  • Match the tone to the severity. Data loss is not the moment for humour.

Do not

  • Show status codes or exception text to users.
  • Blame: invalid, illegal, incorrect, you failed to.
  • Use humour for serious failures.
  • Say 'please try again later' with no explanation and no estimate.

Placement and semantics

  • Next to the field or element that caused it.
  • Associated with the field through aria-describedby, with aria-invalid set.
  • Summarised at the top of long forms, with links to each field and focus moved to the summary on submit.
  • Never colour alone: include an icon and text.
  • Never in a toast if the user has to act on it.

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

Principles behind this

The reasoning this solution is an application of.

Relied on by

Entries that assume this is already in place.

  • Input ValidationPattern

    Detecting the problem is half the job. The sentence is the other half.

Check your work

Review passes that test whether this was done properly.

Short definition

The one-paragraph version, for when that is all you need.

Related concept

Connected closely enough to change how you apply this.