Skip to content

Find what you need, instantly

Search components, ARIA roles & attributes, and WCAG criteria.

All roles

button

Widget role

Identifies an interactive control that performs an action — submitting, toggling, opening a dialog — when activated. It must respond to both Enter and Space and sit in the tab order. Always prefer the native `<button>` element, which provides all of this for free; use role='button' only when you truly can't.

Used on
Any activatable element. Always prefer the native <button>, which provides this role for free.
Accessible name
Required. From visible child text, or aria-label / aria-labelledby for icon-only buttons.
Example
role="button"
<button type="button">Save changes</button>

<!-- toggle button -->
<button aria-pressed="false">Mute</button>
See a live, tested example on the Button (incl. toggle button) page