Element: ariaSelected property

Baseline 2023

Newly available

Since October 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

The ariaSelected property of the Element interface reflects the value of the aria-selected attribute, which indicates the current "selected" state of elements that have a selected state.


A string with one of the following values:


The item is selected.


The item is not selected.


The item is not selectable.


In this example the aria-selected attribute on the element with an ID of tab-id is set to "true". Using ariaSelected we update the value to "false".

<button role="tab" aria-selected="true" aria-controls="tabpanel-id" id="tab-id">
  Tab label
let el = document.getElementById("tab-id");
console.log(el.ariaSelected); // true
el.ariaSelected = "false";
console.log(el.ariaSelected); // false


Accessible Rich Internet Applications (WAI-ARIA)
# dom-ariamixin-ariaselected

Browser compatibility

BCD tables only load in the browser

See also