Every <button> must have a non-empty accessible name from text, aria-label, aria-labelledby, or labeled content.
<button>Submit</button>
<button aria-label="Close"></button>
<span id="close-label">Close</span>
<button aria-labelledby="close-label"></button>
<button><img alt="Close" src="/icon.svg" /></button><button></button>
<button aria-label=""></button>
<button aria-labelledby="missing"></button>
<button><svg></svg></button>When: A button has an empty accessible name
Warning: <button> missing accessible text
Solution: Provide text, aria-label, aria-labelledby, or labeled content
Accessibility: Unlabeled buttons are announced as ‘button’ only, offering no context to screen-reader users.
SEO: Buttons aren’t indexed by search engines when they lack descriptive names.
Prevent unnamed buttons by enforcing reliable accessible-name sources.
G208: Accessible Name Computation for button content.ARIA6: Using aria-label to provide labels for button elements.The <button> element's label is its accessible name; it can come from text, aria-label, aria-labelledby, or labeled descendants like img alt.