All articlesWhy Does My Site Fail WCAG Forms Checks? Common Label, Error, and Autocomplete Fixes
14 min readHorizontal Impact

Why Does My Site Fail WCAG Forms Checks? Common Label, Error, and Autocomplete Fixes

Fix the label, error, and autocomplete failures that trip WCAG form checks, with code for placeholders, required fields, and grouped inputs.

Sites fail WCAG form checks when inputs have no programmatically associated label, when error messages only show up as a color change, and when common fields like name, email, and address are missing autocomplete attributes. Fix those three first, then check how your form handles instructions, required fields, grouped options, and keyboard use.

Forms deserve that attention. The WebAIM Million, an annual analysis of the top one million home pages, lists missing form input labels among the six most common error types it detects, alongside low-contrast text and missing alt text. Forms also hit screen reader users hard, because a broken form doesn't just annoy someone. It blocks them from checking out, signing up, or contacting you at all.

Here's why each failure happens and what fixes it.

Why do form labels fail WCAG accessibility checks?

Form labels fail WCAG checks when the visible label text isn't programmatically tied to its input, so a screen reader announces the field as "edit text, blank" instead of "email address, edit text." In WCAG terms, the field has no accessible name, which fails Success Criterion 1.3.1 (Info and Relationships) and 4.1.2 (Name, Role, Value).

The usual mistake looks harmless. A <label> element sits on the page right next to the input, styled to look correct. Visually, it's fine. But if the label isn't wired to the input in code, a screen reader has no idea the two belong together. Voice control users hit the same wall: if someone says "click email field" and the field has no name, there's nothing for the software to match.

There are two ways to wire a label to its input:

  • Explicit association (recommended): Give the input an id and point the label's for attribute at it.
    <label for="email">Email address</label>
    <input type="email" id="email" name="email">
  • Implicit association: Wrap the input inside the label element.
    <label>Email address
      <input type="email" name="email">
    </label>

Both are valid. We'd lean toward explicit association because it holds up better in CSS layouts, especially when a designer wants the label and input in different containers. Wrapping earns its place when you generate markup dynamically and don't want to manage matching id values across components, since there are fewer things to break when someone renames a field later.

What doesn't count as a label: a plain <div> or <span> sitting next to an input. It looks like a label but has no code relationship to the field. The fix guide for missing form labels shows each valid pattern side by side.

Why doesn't placeholder text count as a label?

Placeholder text is a hint, not a label. Some screen reader and browser pairings read it once when the field gets focus, and others skip it entirely. None of them treat it as a persistent, reliable name for the field.

The bigger problem is that it vanishes the moment someone starts typing. If a user pauses mid-form, tabs away, and comes back later, the field shows what they typed but no longer says what it asked for. For a sighted user, that's mildly annoying. For someone with a cognitive disability or short-term memory challenges, it can mean re-checking fields they thought they'd already answered.

Picture a signup form that uses gray placeholder text for every field (name, email, password) and nothing else. It looks clean, and it saves vertical space. It also fails WCAG 1.3.1, and light gray hint text is hard to read for low-vision users, especially when it falls below the 4.5:1 contrast ratio WCAG sets for normal-size text.

You don't have to delete your placeholders. Keep them as visual hints if they help, and let a real label do the accessibility work.

What if you can't show a visible label?

Sometimes a visible label really would clutter the design, like a compact search bar in a header where a magnifying glass icon carries the meaning visually. The field still needs an accessible name, and aria-label gives it one:

<input type="search" aria-label="Search the site" placeholder="Search...">

The placeholder is still there as a visual hint, but the aria-label now does the accessibility work. If text on the page already describes the field, such as a heading above a group of filters or a multi-part address block, point at it with aria-labelledby instead of repeating it.

You can also keep a real <label> and hide it with a visually hidden CSS class (clipped, absolutely positioned, zero size). Don't use display: none. That removes the label from the accessibility tree entirely, so it's gone for assistive tech, not just invisible.

One more rule applies whenever a field does have visible label text. WCAG 2.5.3 (Label in Name) requires the accessible name to contain the text that's shown on screen. If the screen says "Email" but an aria-label renames the field "Your contact address," a voice control user who says "click Email" may get nothing.

What does WCAG require for labels and instructions?

WCAG Success Criterion 3.3.2 (Labels or Instructions) requires labels or instructions whenever content asks for user input. A label tells people what a field is. Instructions cover what else they need to fill it in correctly: the expected format, which fields are required, and rules like password requirements.

3.3.2 asks whether that guidance exists. 1.3.1 and 4.1.2 ask whether software can read it. A form needs both, which is why a visible label that isn't wired to its input can look complete and still fail an audit.

Keep the label about purpose and put formatting help in a separate hint. "Format: MM/DD/YYYY" isn't a label. "Date of birth" is the label, and the format note is a hint tied to the input with aria-describedby, so a screen reader reads it after the field's name:

<label for="dob">Date of birth</label>
<input type="text" id="dob" name="dob" autocomplete="bday"
  aria-describedby="dob-hint">
<p id="dob-hint">Use the format MM/DD/YYYY</p>

How should you mark required fields?

A red asterisk in the label text isn't enough on its own. Screen readers don't reliably announce an asterisk as meaning "required," and it means nothing to a user who doesn't know the convention. Back it up in code with the native required attribute or aria-required="true", or put the word "(required)" inside the label itself. If you do use asterisks, say what they mean at the top of the form. The required field indicator fix guide covers the markup.

What makes an error message accessible under WCAG?

An accessible error message identifies the specific field that failed, describes what's wrong in text, and gets announced to screen reader users without making them hunt for it. This falls under WCAG 3.3.1 (Error Identification) and 3.3.3 (Error Suggestion), with 1.4.1 (Use of Color) ruling out color as the only signal.

Here's a failure pattern worth checking for: a field turns red when validation fails, and that's it. No text, no icon, nothing else. If you're colorblind or using a screen reader, that field looks fine. You submit the form again. It fails again. You have no idea why.

An accessible error needs a few things working together:

  • Text that names the problem. "Email address is required" beats a red border every time.
  • A connection between the error text and the input, usually aria-describedby pointing at the error message's id.
  • The aria-invalid="true" attribute on the input once it fails validation.
  • Error text with at least 4.5:1 contrast, the same as any other normal-size text on the page.
  • A suggested correction when you know one. 3.3.3 asks for it whenever it won't compromise security or the purpose of the content, which is why "Enter a phone number in the format 555-555-5555" beats "Invalid input."

Here's what that looks like in practice:

<label for="phone">Phone number</label>
<input type="tel" id="phone" name="phone" autocomplete="tel"
  aria-invalid="true" aria-describedby="phone-error">
<span id="phone-error" role="alert">
  Enter a phone number in the format 555-555-5555
</span>

That role="alert" attribute matters more than it looks. Without it, or an equivalent aria-live region, a screen reader user might not hear the error at all unless they navigate back to the field. With it, the error is announced the moment it appears, which matches what a sighted user sees when red text pops up under a field.

One thing we'd push back on: don't rely on browser-native validation popups as your only error handling. They're inconsistent across browsers, they aren't always announced well, and they vanish the second the user clicks elsewhere. Build your own error states in the DOM.

What is the autocomplete attribute and why does WCAG require it?

The autocomplete attribute tells browsers and assistive technology what kind of data a field expects, such as a name, email, street address, or credit card number, so users don't have to retype information they've already entered elsewhere. WCAG Success Criterion 1.3.5 (Identify Input Purpose) requires it on fields that collect information about the user, and it became a requirement when WCAG 2.1 was published in 2018.

This one catches people off guard because it doesn't feel like a "real" accessibility issue at first. But think about who benefits: someone with a motor disability who struggles to type, someone with a cognitive disability who has trouble recalling personal details under pressure, or an older user who doesn't want to fumble through a form field by field. Autocomplete helps people well beyond screen reader users.

The fix is simple. Add the attribute:

<input type="text" name="fname" autocomplete="given-name">
<input type="text" name="lname" autocomplete="family-name">
<input type="email" name="email" autocomplete="email">
<input type="tel" name="phone" autocomplete="tel">
<input type="text" name="address" autocomplete="street-address">
<input type="text" name="zip" autocomplete="postal-code">

Use only the values WCAG lists. They're defined in the "Input Purposes for User Interface Components" section of the WCAG 2.2 specification, covering everything from cc-number for credit card fields to bday for birthdates. If you're not sure which value fits a field, check that list rather than guessing. The autocomplete fix guide maps everyday fields like name, email, and address to their tokens.

Note the scope. 1.3.5 covers fields about the person filling in the form, so a field for a gift recipient's address falls outside it, even though autocomplete can still help there.

This is the fix that's easiest to skip because it feels optional. It isn't. 1.3.5 is a Level AA requirement, so any form that aims for WCAG 2.1 or 2.2 AA conformance needs it, and leaving it off a checkout form is one of the easiest wins to miss.

Why do forms fail even when they look fine visually?

Forms fail accessibility audits despite looking correct because WCAG conformance depends on the underlying code, not the visual design. A form can be pixel-perfect and still be unusable with a screen reader or a keyboard alone.

This disconnect trips up designers and developers alike. The form looks clean in the mockup, everyone signs off, and then an automated scan flags a list of violations on that same form. When that happens, check for these:

  • Custom-styled checkboxes and radio buttons built from <div> elements instead of real form controls, which strips out native keyboard support and semantics.
  • Grouped inputs with no <fieldset> and <legend>. A set of radio buttons for "preferred contact method" with no wrapper means a screen reader user hears disconnected options instead of one grouped question.
  • Mismatched for and id pairs. A typo in either attribute breaks the association silently, with no error and no visual sign.
  • Theme or plugin CSS that hides labels for a "cleaner" look, sometimes with display: none, which removes them for assistive tech too.
  • Multi-step forms where progress isn't announced to screen readers as steps change.
  • Icon-only submit buttons, like a magnifying glass on a search form, with no accessible name. They fail for the same underlying reason as an unlabeled input, and the fix guide for buttons without text covers that pattern.

Grouping takes only a few lines of markup:

<fieldset>
  <legend>Preferred contact method</legend>
  <label><input type="radio" name="contact" value="email"> Email</label>
  <label><input type="radio" name="contact" value="phone"> Phone</label>
</fieldset>

A quick gut check: tab through your own form using only the keyboard. Can you reach every field? Can you tell which one has focus? Is the error message read aloud when validation fails? If any answer is no, an auditor or a real user will hit the same wall.

Do unlabeled form fields affect AI crawlers too?

Yes. Unlabeled form fields create the same ambiguity for AI systems that they create for screen readers. When ChatGPT, Perplexity, or Google's AI Overviews parse a page to work out what a form does (sign up, contact, search, check out), they have the same structural cues to go on: label text, aria-label attributes, and the surrounding context. A field with no name is as opaque to a language model as it is to a screen reader.

Say someone asks an AI assistant how to contact a business, and the contact form is a wall of placeholder-only inputs. The engine has nothing concrete to describe, so it may skip the form or describe it inaccurately. A form built with real <label>, <fieldset>, and <input> elements is easier for both audiences to read. The guide to accessible names for AI agents explains how the same missing name affects a screen reader and an extraction model.

So fixing form labels pays twice: you satisfy WCAG 1.3.1 and 4.1.2, and you give machines cleaner structure to read. Don't expect a ranking boost from labels alone. The payoff is that people and machines can both tell what your form is for.

How do you fix form labels across a large site?

Start with your highest-traffic conversion forms (checkout, signup, contact, newsletter) rather than every form at once. Fixing a checkout form's handful of fields pays off far more than spending the same hour on a rarely used internal admin form.

If you're on a CMS like WordPress or Webflow, or you embed a form plugin like Gravity Forms or Typeform, check whether the tool generates labels by default and whether a theme override is stripping them out. Label-hiding CSS can be added on purpose, for looks, without anyone realizing what it broke.

For custom React or Vue forms, the fix belongs in a shared input component. Have that component take the label text as a prop and render the label element itself, and every form built on it gets a properly wired label from then on:

function TextField({ id, label, ...props }) {
  return (
    <>
      <label htmlFor={id}>{label}</label>
      <input id={id} {...props} />
    </>
  );
}

That's much faster than patching each form one at a time, and it stops the same mistake from coming back in the next form someone builds.

How do you check if your forms pass WCAG?

Run your form through an automated scanner first to catch structural issues like missing labels, missing autocomplete, and contrast failures. Then test it by hand with a keyboard and a screen reader (VoiceOver on Mac, or the free NVDA on Windows) to catch what automation misses, like whether errors are actually announced.

For the manual pass, tab into each field with the screen reader running. If it says nothing, or just reads the input type like "edit text" with no name, that field fails. Without a screen reader, inspect the field in your browser's dev tools and look for a <label> whose for matches the input's id, a wrapping label, an aria-label, or an aria-labelledby. If none of those exist, it's failing.

Label and autocomplete checks are among the easiest things for a scanner to catch reliably, because they're structural. Error announcements and logical tab order are harder, and they need a human tester at least occasionally. AccessKnight's free scan flags fields with missing labels or missing autocomplete tokens across a page, with the code fix attached to each result. It won't replace a manual screen reader test on a complex multi-step checkout, but it clears the structural problems out of the way first.

Where should you start?

Pull up your three most important forms today: checkout, contact, and signup. Inspect every field for a real label, add autocomplete tokens to the name, email, phone, and address fields, and replace any color-only error with text tied to its input. Then tab through each form with your eyes closed and a screen reader on. To catch the fields you missed, run a free AccessKnight scan on the pages those forms live on.

Frequently Asked Questions

Does a placeholder count as a label for WCAG compliance?

No. Placeholder text disappears once a user starts typing and isn't reliably announced as a label by every screen reader. Use it alongside a persistent label element, aria-label, or aria-labelledby, never in place of one.

Does aria-label count as a real fix, or do you need a visible label?

Both are valid fixes, but a visible label is usually better because it stays on screen for sighted users too. Save aria-label for cases where a visible label would genuinely clutter the design, like a compact search bar, and when a field does have visible text, keep that text in its accessible name.

What WCAG success criteria cover form accessibility?

The core ones are 1.3.1 (Info and Relationships), 1.3.5 (Identify Input Purpose), 3.3.1 (Error Identification), 3.3.2 (Labels or Instructions), and 4.1.2 (Name, Role, Value). Error handling also touches 1.4.1 (Use of Color) and 3.3.3 (Error Suggestion).

Can you use color alone to show a form field has an error?

No. WCAG 3.3.1 (Error Identification) requires errors to be described in text, and 1.4.1 (Use of Color) rules out color as the only way to convey information. Pair any color change with a text message that names the problem.

Is the autocomplete attribute required for ADA compliance?

The ADA itself doesn't name WCAG, but WCAG 2.1 AA is the benchmark ADA settlements and DOJ guidance point to. Under 1.3.5, that level requires autocomplete on fields that collect the user's own details, like name, email, address, and phone number.

Do select dropdowns, checkboxes, and radio buttons need labels too?

Yes. Every form control needs an accessible name, including select elements, checkboxes, radio buttons, and textareas. Grouped checkboxes and radio buttons also need a fieldset with a legend, so screen readers announce the question the group answers, not just each option.

Why can a form pass an automated scan but still fail for users with disabilities?

Automated scanners catch structural problems like missing labels, missing attributes, and low contrast, but they can't judge whether your tab order makes sense or whether an error message is read aloud at the right moment. Those need manual keyboard and screen reader testing.

Fix guides for this topic

Step-by-step fixes with copy-paste code for the checks this article covers.

Check your website's accessibility

Scan against all 33 WCAG 2.1 rules and get code-level fix suggestions — free.

Run a free scan →

Keep reading