Favorites

ARIA button Role

button
ARIA Widget RoleThis ARIA role is supported by all modern browsers.
Updated 28th November 2026

The button role marks an element as a button that the user can click or press to trigger an action. Use the native <button> element whenever you can.

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee

Description

The button role tells assistive technology that an element is a button: a control that performs an action when it is activated, such as submitting a form, opening a dialog or playing a video. Screen readers announce it as "button", and users expect to activate it with Enter or Space.

The native <button> element already has this role, and it is focusable, works with the keyboard, can be disabled and takes part in forms, all without any JavaScript. Adding role="button" to a <div> or <span> only changes what is announced: you also have to add tabindex="0" and handle the Enter and Space keys yourself, so the native element is almost always the better choice.

A button that toggles on and off can use aria-pressed, and one that opens a menu or other content can use aria-expanded and aria-haspopup. If the control takes the user to a new page or location, it is a link, not a button.

Use the native HTML <button> element where you can: it already has the button role, with the expected keyboard and browser behavior built in.

Properties

Category
Widget
HTML equivalent
<button>
Accessible name from
contents, author
Required parent role
None
Required child roles
None

ARIA Attributes

Required
None
Supported
aria-disabled, aria-expanded, aria-haspopup, aria-pressed
Prohibited
None
Global
All global ARIA attributes can also be used, such as aria-label, aria-labelledby, aria-describedby, aria-hidden.

Syntax

<element role="button">

Example

<!-- Best: the native element -->
<button type="button">Save</button>

<!-- Only if you must: role plus focus and keyboard support -->
<span role="button" tabindex="0"
onclick="alert('Clicked')"
onkeydown="if(event.key==='Enter'||event.key===' '){event.preventDefault();this.click();}"
style="display:inline-block;padding:4px 12px;border:1px solid #888;border-radius:4px;cursor:pointer">Custom button</span>

Browser Support

The following information will show you the current browser support for the button ARIA role. Hover over a browser icon to see the version that first introduced support for this ARIA role.

This ARIA role is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee