HTML aria-pressed ARIA Attribute
The aria-pressed attribute turns a button into a toggle button and gives its state: pressed (true), not pressed (false) or mixed.
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
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.
Desktop





Tablets & Mobile





