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.
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.
Continue from here
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
Principles behind this
The reasoning this solution is an application of.
- Framing EffectCognitive bias
- Error PreventionHeuristic
- Help Users Recognise, Diagnose and Recover From ErrorsHeuristic
- Match Between System and the Real WorldHeuristic
- Visibility of System StatusHeuristic
- Postel's LawLaw
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.
Short definition
The one-paragraph version, for when that is all you need.
- MicrocopyTerm
- Voice and ToneTerm
Related concept
Connected closely enough to change how you apply this.
- Error Identification and SuggestionAccessibility
- Use of ColorAccessibility
- UI to UX WritingAI workflow
- Alert and Inline MessageComponent
- Text InputComponent
- ToastComponent
- AuthenticationPattern
- Empty StatesPattern
- Payments and CheckoutPattern
- Color AccessibilityUI foundation
- Semantic ColorUI foundation
- Visual StatesUI foundation
- Form Labels and Help TextUX writing
- MicrocopyUX writing
- Voice and ToneUX writing