Skip to content
easeweb
Search topics

Error summaries that don't say which fields failed

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

WCAG 2.2
SC 3.3.1A
Required by
Section 508 · EN 301 549 (EU)
Broken
The accessibility problem illustrated: No vision:Check what?
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?

BrokenA general banner and red borders

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Name each field in error, and what to change, in text

Before
BrokenA 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>
What is wrong2 points
  • People can't tell what to fix. The banner says something failed but not what.
  • People who can't see the red, or who use a screen reader, can't tell which fields failed. The invalid class only paints a red border, so the two fields in error are identified by colour and nothing else.
After

An error summary that links to each field

<div id="error-summary" tabindex="-1">  <h2>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>
How it is fixed4 steps

This is the page as the server, or the script, renders it after the failed submission.

  1. Render a summary above the form, with a heading that says how many problems there are.
  2. List each problem as a link that names it in the words of the field's label and goes to that field: a link to an input's id moves focus into it.
  3. Say the same thing again in a message at each field, tied to it with aria-describedby, so people who reach a field by Tab, or who have scrolled down, still hear and see what to change.
  4. Move focus to the summary once it has rendered, so a screen reader reads its heading straight away and keyboard users start from the list.

This fixes the Before and passes 3.3.1.

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.

How screen readers handle aria-describedby and aria-invalid="true"

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.

EaseWeb service

Fixed it? Keep it from coming back.

I turn guides like this one into rules your coding agents follow and checks your CI runs. Then I retest by hand with a keyboard and screen readers, periodically.

See the service