Form Control Accessible Name Check
Description
The “Form Control Accessible Name Check” evaluates whether all form controls on the page have an accessible name.
Example outcome
I found that all form controls have an accessible name.
Impact
- Visual Impairments: Screen readers will announce the input only as “edit field” or similar, giving no context.
- Motor Impairments: Users relying on voice input can’t refer to the field by name to interact with it.
- Cognitive Disabilities: A lack of guidance increases cognitive effort and task failure.
Fixes
To address <input>
elements missing an accessible name:
- Locate the problematic
<input>
element. - Add a
<label>
element correctly referencing the<input>
element with thefor
attribute. - If prefered, add an
aria-label
attribute and provide an informative accessible name. - Upon preference, use the
aria-labelledby
attribute, pointing to theid
of the element that provides the<input>
element’s accessible name. - Finally, you can also provide an accessible name by including the
title
attribute in the<input>
element.
Resources
- WCAG 2.2: Understanding Success Criteria 1.1.1
- WCAG 2.2: Understanding Success Criteria 1.3.1
- WCAG 2.2: Understanding Success Criteria 3.3.2
- WCAG 2.2: Understanding Success Criteria 4.1.2
- WCAG 2.2 Techniques: Technique H44: Using label elements to associate text labels with form controls
- WebAIM: Semantic Structure: Regions, Headings, and Lists
- WebAIM: Creating Accessible Forms