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:
2

WCAG Levels:

  • A

WCAG Guidelines:

Solution Techniques:

Automated Test Accuracy:
High

uTester Severity:
4

DRRSAG Designations:

  • description

How to Fix the Problem

Use the appropriate element’s ID in the ‘for’ attribute

The Algorithm, in Simple Terms

Engine scans label elements having a “for” attribute and checks whether the id in the attribute points to an existing element

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

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
Email: accessibility@user1st.com