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.
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.
A string.
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"
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
ariaDescription | 
83 | 83 | 119 | No | 69 | No | 83 | 83 | 119 | 59 | No | 13.0 | 
    © 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
    https://developer.mozilla.org/en-US/docs/Web/API/Element/ariaDescription