Skip to content

Form fields with missing or mismatched labels

A delivery form looks fully labelled, but one name is loose text, one label points at the wrong id and one field has a different aria-label, so the words people see are not the fields' names.

SC 1.3.1ASC 2.5.3ASC 3.3.2A Markdown for agents
Broken Looks labelled. Isn't.
Fixed The label is the name.
The same control broken and fixed.
01

The problem

Screen reader and voice control users can't tell which field is which, even though every field looks labelled.

02

Try it

Click each label, then press Tab to move through the fields.

Both versions look the same. Does clicking a label put you in its field? Below the form, compare the label you see with the name a screen reader hears.

Full name
Phone
Label on screen
—
Screen reader hears
(Tab to a field)

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Make the words people see the field's name: a label element, or aria-labelledby to the visible text.

  1. 1Every field has visible label text that stays on screen while it holds a value.
  2. 2That visible text is the field's accessible name, through a label element or aria-labelledby.
  3. 3Don't give a field an aria-label that says something different from its visible label.
Before Text that looks like labels, but isn't
<div class="field-title">Full name</div><input name="name" type="text"> <label for="post-code" class="field-title">Postcode</label><input id="postcode" name="postcode" type="text"> <div class="field-title">Phone</div><input name="phone" type="tel" aria-label="Contact number">
After

Label elements

<label for="name">Full name</label><input id="name" name="name" type="text" autocomplete="name"> <label for="postcode">Postcode</label><input id="postcode" name="postcode" type="text" autocomplete="postal-code"> <label for="phone">Phone</label><input id="phone" name="phone" type="tel" autocomplete="tel">

Why this fix: Use native HTML first

04

Verify the fix

4 checks, no mouse.

Test with: Keyboard, Screen reader, Zoom, Forced colors

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 shared field component changes.

Limits

This is a starting pattern, not a guarantee for every application. Grouped controls such as radio buttons need a fieldset and legend as well, which this guide doesn't cover. Fields added by third-party widgets, payment iframes or content editors 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.

Keep this fixed as your code changes.

Turn guides like this into rules your coding agents and CI follow, then have the result retested with a keyboard and screen readers.

How retests work