aria-input-field-name
Web validation
Custom form controls built with ARIA roles such as textbox, searchbox, or combobox need a programmatic name. Without one, screen‑reader users hear only “edit text” or “input”, making the control’s purpose unclear and increasing form errors. Provide a name using aria-label or aria-labelledby.
Pass Patterns
Using aria-label
A <div> with the textbox role uses aria-label to expose its purpose.
<div role="textbox" tabindex="0" aria-label="Search keywords"></div>Using aria-labelledby
A <div> with the textbox role references on‑screen text with aria-labelledby.
<span id="msg">Message</span>
<div role="textbox" tabindex="0" aria-labelledby="msg"></div>Fail Patterns
Missing label
A <div> with the textbox role doesn’t specify a label.
<div role="textbox" tabindex="0"></div>aria-labelledby references empty text
A <div> with the textbox role references empty on‑screen text with aria-labelledby.
<span id="msg"></span>
<div role="textbox" tabindex="0" aria-labelledby="msg"></div>WCAG techniques
Sufficient techniques
- ARIA14: Using aria-label to provide an accessible name where a visible label cannot be used
- ARIA16: Using aria-labelledby to provide a name for user interface controls
ACT Rules
Try It Yourself
Using a screen reader
New to screen reader testing, or need a refresher?
Review this article first: Practical guides for using screen readers
- Load the page and open a screen reader.
- Move focus to the ARIA text field.
- Listen for the element’s name.
Expected result: The screen reader announces the accessible name (for example, “Search keywords”).
Actual result: The screen reader only announces the element type, without a name that conveys its purpose.
FAQ
How does this issue relate to 4.1.2 Name, role, value?
SC 4.1.2 requires that every user-interface component expose a programmatic name, role, and, where applicable, value. Inputs without an accessible name violate that requirement.
Why is this issue marked as Serious?
Unnamed inputs block users who rely on screen readers from knowing what data to enter, preventing successful form submission. On mainstream browsers and assistive technologies, this results in lost information, errors, and task abandonment.
Standards and Regulations
| Standard | Success Criterion | Reference |
|---|---|---|
| WCAG 2.2 | 4.1.2 Name, Role, Value (A) | For all user interface components, the name and role can be programmatically determined; states, properties, and values that can be set by the user can be programmatically set; and notification of changes to these items is available to assistive technologies. |
| EN 301 549 | 9.4.1.2 Name, Role, Value | Same as the WCAG text. |
| 508 Trusted Tester | 1.3.1-programmatic-label, 5.C | The combination of the accessible name, accessible description, and other programmatic associations (e.g., table column and/or row associations) describes each input field and includes all relevant instructions and cues (textual and graphical). |