liveBook · Manning

Validation summary

As explained in Architecting Accessibility

An error summary is a collection of form validation errors that identifies affected fields and explains the problems requiring attention.

When a form has several errors, users should not have to hunt for them. An error summary gives a focused overview of which fields need attention and why, while links and nearby messages help users reach and fix each problem. section 6.1.6

<div tabindex="-1" id="error-summary"> #A
  <h2>There is a problem with your submission</h2> #B
  <ul> #C
    <li><a href="#email">Your email address is required.</a></li> #C
<li><a href="#password">Password must be at least ...</a></li> #C
  </ul>
</div>

A focusable summary uses a heading and linked list of field errors. On invalid submission, show it and move focus to it; ensure it is in the DOM and focusable before calling .focus(). section 6.1.6

Make the summary part of a consistent recovery pattern:

  • List errors in the same order as their fields, and link each item to the relevant field. section 6.1.6
  • Keep an explanatory message beside each invalid field, mark invalid inputs with aria-invalid="true", and describe the problem and how to fix it when possible. section 6.1.10
  • Use more than color to identify errors. A focused summary helps sighted, keyboard, and screen reader users understand what happened. section 6.1.6 section 6.1.10

How Architecting Accessibility covers it

How deep it goes
Explains summary structure, field links, focus management, and inline cues, including timing focus until the summary is present and focusable.
Examples
Shows a summary linking to email and password fields, paired with inline messages and invalid-state indicators.
What you can do after
Build an error summary that directs users to invalid fields and works with keyboard and screen reader navigation.
How it connects
Connects form validation with keyboard focus, screen readers, inline error messages, and ARIA invalid-state attributes.

Also explained in

Compare how 4 books explain validation summary →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Architecting Accessibility. The section links point to the parts of the book it draws on.