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 theforattribute. - If prefered, add an
aria-labelattribute and provide an informative accessible name. - Upon preference, use the
aria-labelledbyattribute, pointing to theidof the element that provides the<input>element’s accessible name. - Finally, you can also provide an accessible name by including the
titleattribute 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