Skip to content
SEO Optimizer is live, Audit on page SEO and AI-search readiness. Try it free

How to Fix 'Form Elements Do Not Have Associated Labels'

"Form elements do not have associated labels" is one of the most common accessibility audit findings. It means an input, select or textarea has no accessible name, so a screen reader announces it as "edit text" or "combo box" with no clue what to enter. It also hurts voice control users, who say a field's label to select it, and anyone who taps a label expecting the field to focus. The fix is usually a one-line change per field.

Why the Warning Appears

Each form control needs an accessible name that assistive technology can read. Audits report that form elements do not have associated labels when none of these exist:

  • A <label> connected with for and id, or wrapping the field.
  • An aria-labelledby that points to visible text.
  • An aria-label attribute.
  • As a last resort, a title attribute.

A placeholder is not a label. It disappears when you type, often has low contrast, and is not reliably announced. It relates to WCAG 1.3.1 Info and Relationships, 3.3.2 Labels or Instructions and 4.1.2 Name, Role, Value.

Fix 1: Use a Visible Label Element

form.htmlTwo correct ways to label a field
<!-- Explicit: for matches the input's id -->
<label for="email">Email address</label>
<input id="email" name="email" type="email" autocomplete="email">

<!-- Implicit: the label wraps the input -->
<label>
  Email address
  <input name="email" type="email" autocomplete="email">
</label>

This is the best fix in almost every case. Clicking the label focuses the field, which also makes the target bigger on mobile. In React use htmlFor instead of for, and make sure each id is unique on the page. Duplicate IDs break the connection, see how to fix duplicate HTML IDs.

Fix 2: Visually Hidden Labels for Compact Designs

A search box with only a magnifying glass icon still needs a name. Keep a real label and hide it visually, not from screen readers:

search.htmlA label that is hidden visually but still read aloud
<label for="site-search" class="sr-only">Search the site</label>
<input id="site-search" type="search" name="q" placeholder="Search">

<style>
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
</style>

Do not use display: none or visibility: hidden on a label. That hides it from screen readers too.

Fix 3: aria-label and aria-labelledby

When there is no room for a label element, or a field is labeled by nearby text, use ARIA:

form.htmlNaming fields with ARIA
<input type="search" aria-label="Search products">

<h2 id="billing">Billing address</h2>
<input aria-labelledby="billing street-label" id="street">
<span id="street-label">Street</span>

Prefer a visible label when you can. Voice control users need to see the name to say it, and WCAG 2.5.3 Label in Name asks that the accessible name include the visible text.

Fix 4: Group Radios and Checkboxes With fieldset

form.htmlA group question with fieldset and legend
<fieldset>
  <legend>Shipping speed</legend>
  <label><input type="radio" name="ship" value="standard"> Standard</label>
  <label><input type="radio" name="ship" value="express"> Express</label>
</fieldset>

Each option needs its own label, and the legend names the question so a screen reader says "Shipping speed, Standard, radio button".

Fix 5: Check Custom Components and Page Builders

Custom selects, date pickers and form builder plugins are where most cases of form elements do not have associated labels come from. Check the generated HTML, not just your source, and look for settings like "show label" or "accessible label" in the plugin. Hidden inputs (type="hidden") do not need labels.

Find Every Unlabeled Field

Run your sign-up, contact and checkout pages through the accessibility audit. It tests the page in a real browser, lists each field that has no accessible name and maps it to the WCAG criterion. For forms behind a login, use the accessibility extension for Chrome. Then try the form with a screen reader to confirm each field is announced clearly. The web form testing checklist covers validation and error messages too, and the WCAG 2.2 checklist lists every related criterion.

FAQ

Perguntas frequentes

A form field such as an input, select or textarea has no accessible name, so assistive technology cannot tell users what the field is for.

No. Placeholders disappear when typing, often fail contrast and are not reliably announced. Use a real label and keep placeholders for examples.

Only when a visible label really does not fit, such as an icon-only search field. A visible label is better for everyone, including voice control users.

No. Inputs with type hidden are not shown or announced, so they do not need labels. Visually hidden but focusable fields do.

Grátis - sem necessidade de cadastro

Check this on your own site

Run a free scan and see exactly where you stand - no sign-up required.

Executar auditoria grátis