Back to Blog
·11 min read·A11yScope Team

Form Accessibility: How to Fix Missing Labels and Build Accessible Forms

# Form Accessibility: How to Fix Missing Labels and Build Accessible Forms

Forms are how users interact with websites. Login screens, search bars, contact forms, checkout pages, newsletter signups — every meaningful conversion happens through a form. When forms are inaccessible, those users cannot complete the actions your site exists to provide.

According to the WebAIM Million analysis, missing form input labels are the third most common accessibility violation, found on 48.2% of all homepages tested. Only low contrast text and missing image alt text appear more frequently.

The fix is almost always straightforward. A missing label is a missing HTML element. This guide covers every common form accessibility pattern, what breaks it, and how to fix it with working code.

Why Form Labels Matter

A sighted user can look at a text field next to the word "Email" and understand the connection. A screen reader user cannot make that visual association. The screen reader needs a programmatic link between the label and the input — an explicit element or an ARIA attribute that provides the accessible name.

Without that link, a screen reader announces the field as something like "edit text, blank" with no indication of what information is expected. The user is left guessing.

This is not an edge case. Screen reader users navigate forms in a specific way — they tab between form controls, and at each stop the screen reader announces the control's accessible name. If there is no name, the form becomes unusable.

WCAG Success Criteria

Form accessibility is covered by several WCAG 2.1 success criteria:

  • 1.3.1 Info and Relationships (Level A): Information and relationships conveyed through presentation must be programmatically determinable. A visual label next to an input is a visual relationship — it needs a programmatic equivalent.
  • 3.3.2 Labels or Instructions (Level A): Labels or instructions must be provided when content requires user input.
  • 4.1.2 Name, Role, Value (Level A): All user interface components must have a name that can be programmatically determined.
  • 1.3.5 Identify Input Purpose (Level AA): The purpose of input fields collecting user information can be programmatically determined (using autocomplete attributes).

All four are Level A or AA, meaning they are baseline requirements for WCAG conformance.

The Six Most Common Form Accessibility Issues

1. Missing Labels Entirely

The most basic failure: an input field with no associated label.

Broken:


A screen reader announces this as "edit text" with no context. The placeholder attribute is not a reliable label — it disappears when the user starts typing, and many screen readers do not announce it consistently.

Fixed:


The for attribute on the label matches the id on the input. This creates an explicit programmatic association. Clicking the label also focuses the input, which improves usability for everyone.

2. Placeholder as the Only Label

Placeholders are hints, not labels. They have three problems: they disappear on input, they typically have insufficient color contrast, and screen reader support is inconsistent.

Broken:


Fixed (visible label):


Fixed (visually hidden label for compact designs):


.sr-only {

position: absolute;

width: 1px;

height: 1px;

padding: 0;

margin: -1px;

overflow: hidden;

clip: rect(0, 0, 0, 0);

white-space: nowrap;

border-width: 0;

}

The visually hidden class keeps the label accessible to screen readers while removing it from the visual layout. Use this pattern sparingly — visible labels are always preferable when space permits.

3. Incorrect for/id Association

The label exists but does not point to the right input.

Broken:


The for="name" does not match id="fullname", so the label is not associated with the input. Screen readers will not connect them.

Fixed:


This error is especially common when forms are duplicated or when CMS-generated IDs are auto-incremented.

4. Wrapping Without Explicit Association

Wrapping an input inside a label creates an implicit association in most browsers, but explicit association with for/id is more reliable across assistive technologies.

Implicit (works but less reliable):

Explicit (recommended):


Explicit association is more robust and works in all browsers and screen readers without ambiguity.

5. Using aria-label When a Visible Label Would Be Better

aria-label provides an accessible name without a visible label. This is appropriate for search fields or icon-only buttons, but not for standard form fields where a visible label helps all users.

Acceptable (search field):


Wrong approach (standard form field):


Sighted users have no label to read. Use a visible element instead. Reserve aria-label for cases where the visual context makes the purpose obvious to sighted users but not to screen reader users.

6. Missing fieldset and legend for Grouped Controls

Radio buttons and checkboxes that share a question need a group label. Individual elements label each option, but the group question needs a

with a .

Broken:

Preferred contact method:

A screen reader user tabbing to the "Email" radio button hears "Email, radio button" but has no idea what question it answers.

Fixed:

Preferred contact method

Now the screen reader announces "Preferred contact method, group" when entering the fieldset, then "Email, radio button, 1 of 2" for each option.

Accessible Patterns for Every Form Element

Text Inputs and Textareas

For optional fields, indicate this in the label:


Select Dropdowns


Always include a default empty option so the user has a clear starting point.

Checkboxes

Notification preferences

Required Fields

Mark required fields with both a visual indicator and the required attribute (or aria-required="true"):

Include a note at the top of the form: "Fields marked with * are required." The aria-hidden="true" on the asterisk prevents screen readers from announcing "star" — the required attribute already communicates that the field is mandatory.

Autocomplete for User Data

WCAG 1.3.5 requires that common input fields include autocomplete attributes so browsers and assistive technologies can identify the purpose:


This helps users with cognitive disabilities by allowing browsers to auto-fill known values.

Error Messages and Validation

Accessible error handling is a critical part of form accessibility. Errors must be announced to screen readers and visually associated with the field that has the problem.

Inline Error Messages

aria-describedby="email-error"

aria-invalid="true">

Key attributes:

  • aria-invalid="true" tells screen readers the field has an error
  • aria-describedby links the error message to the field
  • role="alert" causes screen readers to announce the error immediately when it appears

Error Summary

For complex forms, also provide an error summary at the top:

There were 2 errors with your submission

Each error links to the specific field, letting users jump directly to the problem.

Framework-Specific Guidance

React and Next.js

React applications commonly have form accessibility issues because JSX makes it easy to create inputs without labels. Add eslint-plugin-jsx-a11y to catch these during development:

{

"plugins": ["jsx-a11y"],

"rules": {

"jsx-a11y/label-has-associated-control": "error"

}

}

For custom form components, ensure the label association is maintained:

function FormField({ label, id, type = "text", required, error, ...props }) {

const fieldId = id || label.toLowerCase().replace(/\s+/g, '-');

const errorId = error ? ${fieldId}-error : undefined;

return (

{label} {required && }

type={type}

id={fieldId}

required={required}

aria-invalid={error ? "true" : undefined}

aria-describedby={errorId}

{...props}

/>

{error &&

}

);

}

For more React-specific accessibility patterns, see our React accessibility guide.

WordPress

WordPress form plugins vary in accessibility quality:

Contact Form 7 generates accessible markup by default with proper label associations. However, custom styling can break the label-input link if you restructure the HTML.

Gravity Forms includes built-in WCAG support and generates fieldset/legend for radio and checkbox groups. Enable the "accessibility-ready" option in form settings.

WPForms provides label-input associations but may need manual configuration for complex layouts.

For any WordPress form plugin, test the output with a screen reader or A11yScope's scanner to verify the labels are properly associated. Our WordPress accessibility guide covers plugin-level accessibility in detail.

Shopify

Shopify's default themes (Dawn, Refresh) include accessible form markup for cart and checkout forms. The main risk areas are:

  • Custom contact forms added via third-party apps — test these separately
  • Newsletter signup forms in the footer — often missing labels
  • Product option selects (size, color) — verify they have associated labels

For Shopify-specific patterns, see our Shopify accessibility guide. If you build on Webflow, our Webflow accessibility guide covers form label configuration in the Webflow Designer.

Testing Your Forms for Accessibility

Keyboard Testing

  • Press Tab to move between form fields. Every field should be reachable.
  • The focus indicator should be clearly visible on each field.
  • Radio buttons should be navigable with arrow keys within the group.
  • Submit buttons should be activatable with Enter or Space.
  • Screen Reader Testing

  • Tab through the form and listen to what is announced at each field.
  • Every field should have a clear, descriptive name announced.
  • Required fields should be identified.
  • Error messages should be announced when they appear.
  • For a full screen reader testing workflow, see our screen reader testing guide.

    Automated Scanning

    Run A11yScope's free scanner against any page with forms. It detects:

    • Missing elements for inputs
    • Incorrect for/id associations
    • Missing fieldset/legend for grouped controls
    • Inputs with no accessible name (no label, no aria-label, no title)

    Automated scanning catches the structural issues. Combine it with keyboard and screen reader testing for complete coverage. For more on what automated scanners can and cannot detect, see our guide on fixing issues found by automated scanners.

    Quick Reference Checklist

    | Element | Required | Check |

    |---------|----------|-------|

    | Text input | with matching for/id | Label announced by screen reader |

    | Textarea | with matching for/id | Label announced by screen reader |

    | Select | with matching for/id | Label and options announced |

    | Checkbox group |

    + + individual s | Group name and options announced |

    | Radio group |

    + + individual s | Group name and options announced |

    | Search input | (visible or hidden) or aria-label | Purpose is clear to screen readers |

    | Required field | required attribute + visual indicator | Screen reader announces "required" |

    | Error message | aria-describedby + aria-invalid="true" | Error announced and linked to field |

    | User data fields | autocomplete attribute | Browser can auto-fill values |

    Fix Your Forms Today

    Missing form labels are one of the most common — and most fixable — accessibility violations on the web. Every pattern in this guide comes down to the same principle: every form control needs a programmatic name that assistive technology can announce.

    Start by scanning your site with A11yScope to identify which forms have missing or broken labels. Then work through the fixes using the patterns above. Most form accessibility issues can be resolved in minutes with the right HTML attributes.

    If you are addressing accessibility issues beyond forms, our guide on how to fix common accessibility issues covers the full range of WCAG violations, and our WCAG compliance checklist provides a complete audit framework.

    Check your website's accessibility now

    Free instant scan. No sign-up required.

    Scan Your Website Free