Element: ariaDescription 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.
The ariaDescription
property of the Element
interface reflects the value of the aria-description
attribute, which defines a string value that describes or annotates the current element.
Value
A string.
Examples
In this example the aria-description
attribute on the element with an ID of close-button
is set to the string "A longer description of the function of this element". Using ariaDescription
we can update the value.
html
<button
aria-label="Close"
aria-description="A longer description of the function of this element"
id="close-button">
X
</button>
js
let el = document.getElementById("close-button");
console.log(el.ariaDescription); // "A longer description of the function of this element"
el.ariaDescription = "A different description";
console.log(el.ariaDescription); // "A different description"
Specifications
Specification |
---|
Accessible Rich Internet Applications (WAI-ARIA) # dom-ariamixin-ariadescription |
Browser compatibility
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
ariaDescription |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.