Skip to content
Search topics

Error summaries that don't say which fields failed

A sign-up form answers a failed submission with one banner that says "Please check the form" and red borders on the fields, so nothing in text says which fields are wrong or what to change.

Broken
Check what?
The accessibility problem illustrated.
01

The problem

People told only to "check the form" have to find the failed fields themselves, and many can't.

02

Try it

Press Sign up, then find what to fix.

Send the form as it is, then look, or listen, for which fields failed and why.

Broken Can you fix this?

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Name each failed field and what to change in text, and lead people to them.

  1. 1Name every field in error in text, with what to change.
  2. 2Never let a general message, colour or border be the only sign of which field failed.
  3. 3After a failed submission, put the first problem where people already are, or move focus there.
Before A general banner and red borders
<div class="banner">Something went wrong. Please check the form.</div> <form novalidate>  <label for="name">Full name</label>  <input id="name" name="name" autocomplete="name" value="Alex Morgan">   <label for="email">Email address</label>  <input id="email" name="email" type="email" autocomplete="email"    class="invalid" value="alex@">   <label for="postcode">Postcode</label>  <input id="postcode" name="postcode" autocomplete="postal-code" class="invalid">   <button>Sign up</button></form>
After

An error summary that links to each field

<div id="error-summary" tabindex="-1" aria-labelledby="error-summary-title">  <h2 id="error-summary-title">There are 2 problems</h2>  <ul class="list-inside list-disc">    <li><a href="#email">Enter an email address, like [email protected]</a></li>    <li><a href="#postcode">Enter a postcode</a></li>  </ul></div> <form novalidate>  <label for="name">Full name</label>  <input id="name" name="name" autocomplete="name" value="Alex Morgan">   <label for="email">Email address</label>  <input id="email" name="email" type="email" autocomplete="email" value="alex@"    aria-invalid="true" aria-describedby="email-error">  <p id="email-error">Error: Enter an email address, like [email protected]</p>   <label for="postcode">Postcode</label>  <input id="postcode" name="postcode" autocomplete="postal-code"    aria-invalid="true" aria-describedby="postcode-error">  <p id="postcode-error">Error: Enter a postcode</p>   <button>Sign up</button></form>

04

Verify the fix

5 checks, no mouse.

Test with: Keyboard, Screen reader, Zoom

0 of 5 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat when fields are added or the shared form component changes.

Limits

This is a starting pattern, not a guarantee for every application. It covers how people learn which fields failed after a submission, not how each message is worded, nor errors in single-field searches, where focusing the field is enough. Forms built by third-party widgets, such as payment fields in an iframe, report errors their own way and need the same check. Test the complete journey with your target assistive technology.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

Keep this fixed as your code changes.

Turn guides like this into rules your coding agents and CI follow, then have the result retested with a keyboard and screen readers.

How retests work