Form Fields With More Than One Associated Label

Form Fields With More Than One Associated Label

WCAG Focus: WCAG 1.3.1 (A), 4.1.2 (A)

When two separate <label for="qty"> tags point to the same form field—or when a form plugin wraps an input in one <label> while adding a second <label for="…"> alongside it—different screen readers behave unpredictably, sometimes reading only the first label, only the second, or speaking both awkwardly.

Why This Pattern Violates WCAG

WCAG 1.3.1 (Level A) and 4.1.2 (Level A) favor a single unambiguous accessible name per form field. Additional instructions or unit hints belong in a paragraph linked via aria-describedby.

Code Comparison

Duplicate Labels Pointing to Same Input ID

<label for="zip">ZIP Code</label>
<input id="zip" type="text">
<label for="zip">5 digits only</label>

Single Label Plus aria-describedby Hint

<label for="zip">ZIP Code</label>
<input id="zip" type="text" aria-describedby="zip-hint">
<span id="zip-hint">5 digits only</span>

How to Fix It in WordPress

  • Keep exactly one <label for="…"> per form field.
  • Attach supplementary helper text or formatting hints with aria-describedby instead of a second <label>.

Finding This Issue Automatically

Custom form templates and duplicated shortcodes occasionally attach multiple labels to a single input ID. The WP ADA Compliance Check plugin detects form fields associated with more than one label so every input speaks clearly and consistently.

Subscribe

Subscribe to receive daily Web Accessibility - Did you know? articles in your inbox.

Cart Accessibility Tools
hide