Back to Info and Examples for Accessibility Insights for Web
input-button-name
Input buttons must have accessible names.
Why it matters
An input button is an <input> element whose type is button , reset , or submit.
An accessible name is a word or phrase coded in a way that assistive technologies can associate it with a specific user interface object. Assistive technologies can then refer to the object by name, not just by type.
When an input button doesn’t have an accessible name, people who use assistive technologies have no way of knowing its specific purpose.
How to fix
Provide an accessible name for each input button using one of the following methods.
Good
titleattribute
Better
- Non-empty
valueattribute - No
valueattribute (applies only iftypeissubmitorreset; causes thetypevalue to be reported as the accessible name) aria-labelattribute
Best
aria-labelledbyattribute
Example
Fail
Pass
aria-label attribute provides an accessible name for the input button. Everyone can tell what the button does.About this rule
This rule passes if ANY of the following is true:
- Element has a non-empty
aria-labelattribute - Element has an
aria-labelledbyattribute that references elements that are visible to screen readers - Element has a non-empty
titleattribute - Element has a non-empty
valueattribute - Element with type
submitorresetdoes not have a value attribute - Element’s default semantics were overridden with
role="presentation"orrole="none"
Use caution when applying role="presentation" or role="none" to an input button.
These roles instruct assistive technologies to disregard the element’s implicit role without hiding its content from users. If an input button has inner text, adding a role of presentation or none will cause it to be reported to users as a text string with no semantic context. For more information, see Using ARIA: Use of Role=presentation or Role=none.