Favorites

HTML aria-pressed ARIA Attribute

aria-pressed
ARIA AttributeThis ARIA attribute is supported by all modern browsers.
Updated 28th November 2026

The aria-pressed attribute turns a button into a toggle button and gives its state: pressed (true), not pressed (false) or mixed.

☕
Enjoying this site?

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

Buy us a coffee

Description

The aria-pressed attribute makes a button a toggle button and reports whether it is currently pressed. Screen readers announce it, for example "Bold, toggle button, pressed". Typical examples are Bold and Italic buttons in a text editor, or a Mute button in a video player.

The label must stay the same when the state changes: a "Mute" button is pressed or not pressed. If the label itself changes, such as from "Play" to "Pause", don't use aria-pressed, because the changing label already tells users what will happen. The mixed value is for a button that controls several items whose states differ.

Only use it on buttons, and update the value with JavaScript on every toggle. For an on/off setting, a switch or a checkbox may be clearer.

Properties

Type
Widget
Value
tristate
Default
None
Used with
button

Syntax

<button aria-pressed="true | false | mixed">

Values

  • trueThe button is pressed.
  • falseThe button is not pressed.
  • mixedThe button controls several items with different states.
  • undefinedThe default: the button is not a toggle button.

Example

<button type="button" aria-pressed="false"
onclick="this.setAttribute('aria-pressed', this.getAttribute('aria-pressed') !== 'true')">
<b>B</b> Bold
</button>
<style>[aria-pressed=true]{background:#2563eb;color:#fff}</style>

Browser Support

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

This ARIA attribute 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