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:

Check1st Severity:

DRRSAG Designations:

  • description

How to Fix The Problem

Ensure that the label’s for attribute is associated with the id attribute of an element that is a form field. Use an alternative labeling (e.g. `aria-label) if a description is required for a non-form field element.

The Algorithm, In Simple Terms

The engine scans for elements referenced by a label’s for attribute, and checks whether they are an input, select or textarea elements.

Why Is It Important?

Incorrectly associate a label with a non-form field element is misleading to assistive technology users.

Code Example

<label for="name">Name</label> 
<input type="text" name="name" id="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