Accessible names for buttons (button-accessible-name)

Buttons must have non-empty accessible names, using visible text, aria-label, or aria-labelledby attributes.

Note: An element with role="menuitem" still requires an accessible name. If it has no content and no attributes providing a name (like aria-label), it will have an empty accessible name, which breaks accessibility for screen reader users.

Menuitem role with no accessible name:

This <button role="menuitem"> element contains only an <img> with empty alt text and no name-providing attributes. It results in an empty accessible name:


Note: Possible to implement because it can be programmatically detected when an element with role="menuitem" contains no visible text content and lacks accessible name attributes such as aria-label, aria-labelledby, or title.

axe detected: 4.1.2  |  QualWeb detected: 4.1.2