Error messages tell the user that something has gone wrong. These messages should be clear, direct, and have an actionable call to action (CTA) for the user.
An error message, different from a warning message, appears after someone has taken an action. The message draws their attention to what has happened and what the consequences are, and what people need to do to move forward. Optionally, they can also include why something happened and whether the problem will occur again.
When crafting an error message, remember that most people scan text instead of reading everything. Make every word count and avoid irrelevant details.
1. Titles are optional depending on the component you choose.
2. Include an informative, scannable title. Try and imagine people trying to understand what’s happening by reading the title on its own.
3. Avoid explaining what to do.
4. Limit titles to three to four words where possible, excluding “an”, “a”, or “the”. The character count will depend on the component you choose.
5. Write in sentence case with appropriate punctuation.
1. Include: the reason for the error and the problem, how someone should act and what happens if they don’t act.
2. If you don’t know the reason for an error, don’t make one up – just say that something’s gone wrong and offer a solution for what people can do.
3. Avoid repeating content from the title.
4. Keep messages to 1 to 2 sentences.
5. Avoid putting technical information in the message or having people look in another location. If it can't be avoided, use a “Learn more” link.
1. action people will be making instead of vague terms such as “OK”.
2. An option to dismiss or cancel lets people feel reassured that they can opt out.
3. Limit your CTA to 1 or 2 words.