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: