Element: ariaRoleDescription property
Baseline 2023Newly available
Since October 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
TheariaRoleDescription property of theElement interface reflects the value of thearia-roledescription attribute, which defines a human-readable, author-localized description for the role of an element.
In this article
Value
A string.
Examples
In this example thearia-roledescription attribute on the element with an ID ofmyApplication has been set. UsingariaRoleDescription we can update the value.
html
<div role="application" aria-roledescription="a description of this widget"> …</div>js
let el = document.getElementById("myApplication");console.log(el.ariaRoleDescription); // "a description of this widget"el.ariaRoleDescription = "an updated description of this widget";console.log(el.ariaRoleDescription); // "an updated description of this widget"Specifications
| Specification |
|---|
| Accessible Rich Internet Applications (WAI-ARIA)> # dom-ariamixin-ariaorientation> |