A: ARIA input fields must have an accessible name (WCAG 4.1.2)
aria-input-field-name
Ensure that every ARIA input has an accessible name.
This means
Input fields with ARIA roles such as role="textbox", role="combobox", role="spinbutton" or role="searchbox" do not have an accessible name. Without a name, screen readers cannot announce the purpose of the field and users do not know what to enter. A placeholder does not replace a label.
Impact
Unclear or nameless fields lead to misuse, aborted processes, and violations of WCAG. Forms become difficult to use, especially for screen reader and keyboard users.
Recommendation
- Prefer native inputs with visible
<label>. - If ARIA roles are used, assign the name via
aria-labeloraria-labelledby. - Do not use placeholders as the sole naming method.
Example
Problematic
<div role="textbox"></div>
Better
<div role="textbox" aria-label="Name"></div>
Best (native elements)
<label for="name">Name</label>
<input id="name" type="text" />
Related WCAG criterion:
WCAG 4.1.2 – Name, Role, Value