Error Message and Error Summary
Field error messages explain individual problems, while an error summary gives a linked overview of problems after submission.
Download Markdown (.md)Soroush’s Product Wiki · https://wiki.soroush.uk/topic/error-message-and-error-summary/
01What it means
An error message is specific feedback associated with the control or action that needs correction. An error summary is a prominent, usually focused list near the start of a submitted form that identifies errors and links to affected fields; it supplements rather than replaces inline messages.[1][2]
02Why it matters
Users need to notice that submission failed, understand every problem, and reach the right place to fix it. Coordinated summaries and inline messages reduce searching and repeated submission, particularly on long pages and for keyboard or screen-reader users.
03When to use it
Use inline messages wherever a field has an actionable error. Add a summary when submission can produce one or more errors beyond the current viewport or when moving focus to a consolidated result improves recovery; avoid summaries for low-level feedback that has not interrupted an attempted action.
04How it works
- Detect errors against documented rules while preserving every valid value.
- Write each message in plain language that identifies the problem and, where possible, the correction.
- Place and programmatically associate the message with its field without relying on color alone.
- On failed submission, present a heading and linked list in the same order as the form's fields.
- Move focus or announce the result appropriately, then clear both summary and inline errors when corrected.
05A practical example
A grant application fails submission with errors in an earlier date and a later attachment. Focus moves to an error summary containing two links; each link reaches a field with the same specific message, while all completed sections remain intact.
06Where it breaks
A summary adds repetition and focus movement, so it can be excessive for a single immediately visible issue. Messages cannot repair confusing questions, and live validation can announce stale or premature errors if timing is poorly managed.
Common mistakes
- Displaying only a generic message such as “There was an error.”
- Using an error summary without repeating messages beside their fields.
- Linking summary items to the wrong element or listing them in a different order from the form.
- Clearing entered data or leaving resolved errors visible after correction.