The label's 'for' attribute references an element that is not a form control

Compliance Data & User Impact

User Impact: Critical

100% Complete

Disabilities Affected:

  • blindness
  • deafblindness
  • learning disablities

WCAG Version:

WCAG Levels:

  • A

WCAG Guidelines:

Solution Techniques:

Automated Test Accuracy:

uTester Severity:

DRRSAG Designations:

  • description

How to Fix the Problem

Ensure that the use of the for attribute is appropriate, otherwise remove it. Use an alternative labeling (e.g. aria-label attribute on the element) in case the label is required, but the labelled element is not a form control.

The Algorithm, in Simple Terms

Engine scans for elements referenced by a label’s ‘for’ attribute and checks whether they are: input, select or textarea HTML elements

Why Is it Important?

When label elements are properly associated with input elements the label is spoken by screen readers when the field receives focus and users with impaired motor control are helped by a larger clickable area for the control, since clicking on the label or the control will activate the control.

Code Example

<label for="name">First name:</label> 
<input type="text" name="name" id="id_example_name" />

Additional Information

Relevant Technologies: HTML and XHTML controls that use external labels

Address: 401 9th St NW, 6th Floor
Washington, DC 20004
Phone number: (888) 995-WCAG
International number: 1(888) 995-9224