Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Form errors not announced to screen readers: add aria-live

PRF-308Medium impactOther toolBy FunnelGuardPublished Updated
On this page

What this issue is

A screen reader reads out what the user focuses on. It does not read out text that simply appears elsewhere on the page. If your form adds an error such as "Enter a valid email" after the user clicks Submit, a sighted visitor sees it. A screen reader user hears nothing unless the message is announced.

Why it costs you leads or sales

Where a screen reader user drops out
  1. Lands on formFills in fields
  2. Presses SubmitValidation fails
  3. Error appearsNot announced, no focus move
  4. Fixes the fieldNever knows what is wrong
  5. Lead sentNever happens

The error exists visually but is never announced, so the journey ends at the submit step.

Submissions from screen reader usersExample numbers
Submissions from screen reader users (example)Errors silent: 20 %; Errors announced: 75 %029582075Errors silentErrors announced%

Example: share of screen reader users who complete a form after a first failed attempt, before and after adding announcements. Numbers are illustrative.

How to check if your site has it

Test your form with a screen reader
  1. Turn on a screen reader

    Use NVDA (free, Windows) with Firefox or Chrome, VoiceOver on Mac (Cmd+F5) or iPhone, or TalkBack on Android.

  2. Submit the form empty or with a bad value

    Use only the keyboard: Tab to fields and press Enter on the submit button.

  3. Listen

    You should hear the error text, or hear focus move to an error summary or the first invalid field. Silence means the issue is present.

  4. Inspect the markup

    In browser dev tools, find the error element. Check whether it or a parent has role="alert", aria-live, or role="status", and whether the container existed in the page before the error was added.

How to fix it

Live region plus linked errorhtml
<form id="lead-form" novalidate>
  <div id="form-errors" role="alert"></div>

  <label for="email">Email</label>
  <input id="email" type="email" name="email" aria-describedby="email-error" required>
  <p id="email-error"></p>

  <button type="submit">Send</button>
</form>
Announce errors and move focusjavascript
const form = document.getElementById('lead-form');
const summary = document.getElementById('form-errors');

form.addEventListener('submit', (e) => {
  const email = form.elements.email;
  if (!email.validity.valid) {
    e.preventDefault();
    const msg = 'Enter a valid email address, for example name@example.com.';
    document.getElementById('email-error').textContent = msg;
    email.setAttribute('aria-invalid', 'true');
    summary.textContent = '1 error: ' + msg;
    email.focus();
  }
});
Fix by platform
  1. Check your form plugin

    Update Gravity Forms, WPForms, Contact Form 7 or Fluent Forms to the latest version. Most current versions add role=alert or an error summary, and some have an accessibility option in the form settings. Check yours with a screen reader.

  2. Patch gaps in your theme

    If the plugin still stays silent, add a small script through a child theme or a code snippet plugin that writes the error text into a role="alert" container.

How to confirm it's fixed

Fix verification
  • Submitting an empty form makes the screen reader read the errors or move to the first error.
  • Each invalid field has aria-invalid="true" and an error linked via aria-describedby.
  • Errors are written in text, not colour alone.
  • The test works with at least two screen reader and browser pairs, such as NVDA with Firefox and VoiceOver with Safari.
  • A successful submit announces a confirmation message or moves to a thank-you page.

How to prevent it happening again

How FunnelGuard handles this

Questions people ask

Why are my form errors not read by a screen reader?

The error text is probably added to the page without a live region and without moving focus. Screen readers only read what is focused or what changes inside an aria-live or role="alert" container. Add one of those, or focus the first invalid field.

Should I use role=alert or aria-live for form errors?

Use role="alert" for errors after a failed submit, because it interrupts and announces right away. Use aria-live="polite" or role="status" for less urgent messages like a saved confirmation. Both work best when the container is already in the page before it is filled.

Is moving focus to the error better than aria-live?

Both are accepted. Moving focus to an error summary or the first invalid field makes the screen reader read it and also helps keyboard users. Many accessible forms combine a focused summary with inline messages linked by aria-describedby.

Does WCAG require form errors to be announced?

Yes. WCAG 2.2 success criterion 4.1.3 Status Messages requires that messages be conveyed to assistive technology without taking focus, and 3.3.1 Error Identification requires errors to be described in text. Moving focus to the error is another way to make sure the user is told.

How do I test if form errors are announced?

Turn on NVDA, VoiceOver or TalkBack, submit the form with a missing or wrong value using only the keyboard, and listen. If you hear no error, or only hear "button", the errors are not announced.

Can an automated tool find missing error announcements?

Only partly. Scanners like axe or Lighthouse can spot missing labels or bad ARIA, but they cannot hear whether a message was spoken after a failed submit. You need a manual screen reader test for that.

Why does aria-live not work when I add it with JavaScript?

Many screen readers ignore a live region that is created at the same moment its text is set. Put an empty container with aria-live or role="alert" in the HTML at page load, then change its text when the error occurs.

Does FunnelGuard catch this?

Other tool

Needs a different kind of tool.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.