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 plate
Reach for this when
- Any failure state.
- Form validation.
- Reviewing support tickets caused by unclear failures.
Common mistakes
- Generic messages.
- Technical detail leaked to users.
- Errors far from their cause.
- Blame in the wording.
- Writing the message from the system's point of view, which produces accurate sentences the reader cannot act on.
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.
What each part of the message does
| Part | Job | Failure without it |
|---|---|---|
| What happened | Name the failure in the reader's terms | The reader does not know what is wrong |
| Why, when known | Give the cause they can act on | They guess, usually incorrectly |
| What to do | One concrete next step | They retry the same thing and fail again |
| What was not lost | Reassure about state | Duplicate submissions and duplicate charges |
| Where to go | A route out for the unfixable | The session ends here |
In practice
- i.
Your card has not been charged
Saying what did not happenA payment failure message that states no charge was made prevents a second attempt, a duplicate charge and a support ticket. It is one sentence and it does more work than the retry button.
Commonly confused with
Close neighbours that get substituted for each other. The difference is stated first, then the condition that picks one over the other.
Error Identification and Suggestion
AccessibilityThe requirement that errors are named in text, located, and offered a correction.
Key difference
Error identification is the mechanism: the failure is stated in text, tied to the field and announced. Error messages are the sentence itself. A perfectly wired error that says Invalid input still leaves the reader stuck.
Use Error Messages when
- The error is detected and announced but says nothing useful.
- The wording blames the reader or names an internal code.
- The fix is what happened, why, and the next step, in that order.
Use Error Identification and Suggestion when
- The error is conveyed by a red border alone.
- Nothing is announced, or focus never reaches the problem.
- You are checking against WCAG 3.3.1 and 3.3.3.
Local chart
WRT·002 · Region III · Grid F2
This entry and the entries it is stated to connect with. Each line is labelled with what the connection means.
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 EffectBIAS·003 · Cognitive bias
- Error PreventionHEUR·005 · Heuristic
- Help Users Recognise, Diagnose and Recover From ErrorsHEUR·009 · Heuristic
- Match Between System and the Real WorldHEUR·002 · Heuristic
- Visibility of System StatusHEUR·001 · Heuristic
- Postel's LawLAW·012 · Law
Relied on by
Entries that assume this is already in place.
- Input ValidationPAT·007 · Pattern
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.
- Form UX ChecklistCHK·001 · Checklist
Short definition
The one-paragraph version, for when that is all you need.
- MicrocopyTERM·132 · Term
- Voice and ToneTERM·133 · Term
Related concept
Connected closely enough to change how you apply this.
- Use of ColorA11Y·010 · Accessibility
- UI to UX WritingAI·006 · AI workflow
- Alert and Inline MessageCMP·015 · Component
- Text InputCMP·003 · Component
- ToastCMP·014 · Component
- AuthenticationPAT·023 · Pattern
- Empty StatesPAT·010 · Pattern
- Payments and CheckoutPAT·024 · Pattern
- Color AccessibilityFND·028 · UI foundation
- Semantic ColorFND·023 · UI foundation
- Visual StatesFND·053 · UI foundation
- Form Labels and Help TextWRT·009 · UX writing
- MicrocopyWRT·001 · UX writing
- Voice and ToneWRT·003 · UX writing