Skip to main content

button-name

Ensures buttons have discernible text

Severity: Critical

Description

All button elements must have accessible names.

For screen reader users, buttons must have legible text to communicate the location, goal, function, or activity in detail.

Why is it important?

An accessible name is a word or phrase written in the code for assistive technologies to link it to a particular UI object. Now, you can refer to the UI object by accessible name instead of type in assistive technologies. When a button lacks an accessible label, assistive technology users cannot determine what it does.

Screen reader users cannot understand the function of components with role="link", role="button", or role="menuitem" that lack an accessible name.

Examples

  • Success:
    • Visible inner text is present to give the button an accessible name.
  • Failure:
    • Button contains an image to convey its purpose visually but does not have an accessible name.

How to fix?

Ensure all buttons have a discernible, accessible name using title, aria-label, aria-labelledby or use inner text available to assistive technologies.

Tags

cat.name-role-value, wcag2a, wcag412, section508, section508.22.a, ACT

References

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Download Copy