Skip to content
easeweb
Search topics

Inline form errors read out while typing, or not at all

An email field checks every key and sends its error as an alert, read before the address is typed, or shows it on leaving where nothing reads it.

WCAG 2.2
SC 4.1.3AA· new in 2.1SC 3.3.1A
Required by
Section 508 · EN 301 549 (EU)
Broken email.addEventListener('input', check);
The accessibility problem illustrated: No vision:Why is it wrong already?
01

The problem

Screen reader users hear an error about their email address while they are still typing it, or never hear the error they left behind.

02

Try it

Type “sam@shop,com”, comma and all, then press Tab and listen.

  • Broken 1: the address is checked on every key, and the error is sent as an alert. When is it first read, and how often while you are still typing?

  • Broken 2: the address is checked when you leave the field. After Tab, is the error read? Press Shift + Tab to go back: is the field read with its error?

  • Apply a fix. When the field is left: nothing is read while you type, and the error once after Tab. When typing pauses: stop for a second partway through the address.

Broken Can you fix this?

Screen reader says:

(Type in the email field)

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Check when typing is done, and say the error once.

Before

An error checked on every key, sent as an alert

<label for="email">Email address</label><input type="email" id="email" name="email" required aria-describedby="email-error"><p id="email-error" role="alert"></p>…
What is wrong3 points

The message is right, and it is tied to the field. When it is said is wrong.

  • The check runs on every key, so the error appears at the first letter of an address that isn't finished.
  • It comes and goes as the address passes and fails while it is typed, and each time it comes back it is read again.
  • It is sent as an alert, which may be read over the letters being typed.
After

Check when the field is left, and say it once

<label for="email">Email address</label><input type="email" id="email" name="email" required aria-describedby="email-error"><p id="email-error" role="status"></p>…
How it is fixed4 steps
  1. Run the check on change. It fires when the field is left after its value changed, so nothing is checked while the keys go in, and tabbing past a field nobody typed in marks nothing as wrong.
  2. Give the message's paragraph role="status", on the page and empty from the start. A polite region asks the screen reader to read the error once, after it has finished what it is saying, usually the next field's name, though that name can cut it short (see Limits).
  3. Point the field's aria-describedby at the paragraph, and set aria-invalid in the same step, so going back to the field reads it as invalid, with its error.
  4. Write the message only when it changes, and on input only clear it, once the address passes. Correcting the address takes the error away at once, and nothing new is said while the keys go in.

This fixes both Befores and passes 4.1.3 and 3.3.1. Each error is said once, after the person has finished with the field, without moving focus, and stays tied to the field.

Easily confused
04

Design ideas

An error can look light, and still be said in words, at the right moment.

Four ways to draw a field’s error. Type into each with a mistake, then press Tab or Continue: two say what is wrong in words once you have stopped, and two never put it into words.

In the design file

  • Draw each field at rest with its hint, with its error after it is left, and corrected.
  • Write beside each error when it shows, either once the field is left or after a one-second pause for a field people work towards, such as a new password.
  • Write each error in words under its field, saying what to enter; a red border, an icon or a shake only goes with the words.
  • For a checklist, write the one line said when typing stops, such as “2 of 3 rules met”.
  • Write the ratio next to the error’s colour, at least 4.5:1 for its words.

Passes

  • We’ll send your receipt here.

    A hint line that becomes the error Under the field, a grey hint says what the address is for, 6.31:1. Leave the field with a mistake and the same line turns red, 6.54:1, with a warning icon and what to enter, and the border thickens to 2 pixels. Nothing below moves, and help and error are always in the same place. The line is said once, as it changes, and again with the field when people come back.
  • Meet all 3 rules

    • 12 or more characters
    • A number
    • A capital letter
    A password checklist that ticks as you type The rules for a new password are listed under it, each with an empty circle that gets a green tick, 6.35:1, the moment the password meets it, so people see where they are at every key. The line above the list, “2 of 3 rules met”, changes only when they stop for a second, and that line is what a screen reader reads.

Fails

  • A cross or a tick inside the field, and no wordsWCAG 3.3.1 From the first letter, a red cross sits at the end of the field, and it turns into a green tick the moment the address is valid. It looks quick and tidy, but nothing ever says what is wrong or what to enter, and the cross is shown for an address people are still typing. Put the words under the field, and show the cross once the field is left.
  • A field that shakes and turns redWCAG 3.3.1 Press Continue with a mistake and the field shakes from side to side and its border turns red, the way a phone’s lock screen says no. The shake shows a change and stops within half a second, so it can stay. But nothing says what is wrong, and with reduced motion only the red border is left. Add the words under the field.
05

Verify the fix

4 checks, no mouse.

Test with: Screen reader, Keyboard

0 of 4 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the form library, its settings or the field components change.

How screen readers handle role="alert", role="status", aria-describedby and aria-invalid="true" · tested by hand, October 2026

Limits

A polite message written as focus moves is read after the next field's name, or cut short by it, depending on the screen reader and how much that field has to say, so the error is also tied to the field, to be read when people return to it. This guide covers one field checked in the browser. What the message says, and how a field shows it is wrong, is covered in form errors that don't say how to fix them; the list of errors when the form is sent in error summaries that don't say which fields failed; and the result of a form sent in place in form success and error messages that are never announced. Test your real form, with its library and its server checks, with the screen readers your users use.

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