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



