button-name-present
Buttons have an accessible name
Checks that buttons expose a non-empty accessible name.
Applies to. Applies to <button>, <input type="button">, <input type="submit">, <input type="reset"> and elements with role="button", where the element is included in the accessibility tree. role="presentation"/"none" takes an element out of scope unless a global ARIA attribute or focusability restores its role, per presentational roles conflict resolution.
Expectation. The element has a non-empty accessible name. A programmatic name is taken first (aria-labelledby, aria-label, an associated <label>, title). Failing that, an <input> button falls back to its value attribute, and type="submit"/type="reset" fall back to the user agent's own "Submit"/"Reset" default, which is why those two are never nameless. Failing both, a button whose role is name-from-content falls back to its subtree text, counting each descendant's own name (an <img alt>, aria-label or title) rather than only text nodes.
Examples
<button>Save</button>
The button's text content is its accessible name.
<button></button>
The button has no text content, `aria-label`, or `aria-labelledby`.