Export (0) Print
Expand All

aria-pressed attribute | ariaPressed property

Sets or retrieves the pressed state of a button that can be toggled.

Internet Explorer 8

Syntax

HTML
<element aria-pressed="p" ... >
JavaScript
object.setAttribute("aria-pressed",value);var value = object.getAttribute("aria-pressed");

Property values

Type: String

The pressed state.

(true)

The element is down (button pressed).

(false)

The element is up.

(mixed)

The element indicates both pressed and unpressed states.

(undefined)

Default. The element state is unknown.

Standards information

Remarks

Used in Roles
button

 

Buttons with a defined aria-pressed state can be toggled. (When aria-pressed is true the button is down, when false it is up.) Simple command buttons should not define a aria-pressed state.

Note  The presence of the aria-pressed attribute affects the behavior of accessibility and automation tools. The attribute should not be used carelessly.

Note  For cross-browser compatibility, always use the WAI-ARIA attribute syntax to access and modify ARIA properties, for example object.setAttribute("aria-valuenow", newValue).

See also

Accessible Rich Internet Applications (ARIA)
W3C ARIA-Pressed

 

 

Show:
© 2014 Microsoft