Label's for Attribute Contains An ID That Does Not Exist In The Document

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

Use the desired element’s id attribute value for the label’s for attribute.

The Algorithm, In Simple Terms

The engine scans label elements that have for attributes, and checks whether the value corresponds to the id attributes of existing elements.

Why Is It Important?

When label elements are properly associated with their respective input elements, the label is spoken by screen readers when the form field receives focus. In addition, users with impaired motor control have a larger clickable area for the control to activate it.

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

This element perfoms as a container, and has no functionality. This container may contain another elements that has functionality or logical role.

Ignore this issue if this element has an alternative that performs the same and overrides the content of this element.

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