Element: ariaDescription-Eigenschaft

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.

Die ariaDescription-Eigenschaft des Element-Interfaces spiegelt den Wert des aria-description-Attributs wider, welches einen String-Wert definiert, der das aktuelle Element beschreibt oder kommentiert.

Wert

Ein String.

Beispiele

In diesem Beispiel wird das aria-description-Attribut des Elements mit der ID close-button auf den String "A longer description of the function of this element" gesetzt. Mit ariaDescription können wir den Wert aktualisieren.

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"

Spezifikationen

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

Browser-Kompatibilität

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
ariaDescription

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support