Element: ariaRoleDescription-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 ariaRoleDescription-Eigenschaft der Element-Schnittstelle spiegelt den Wert des aria-roledescription-Attributs wider, das eine menschenlesbare, vom Autor lokalisierte Beschreibung der Rolle eines Elements definiert.

Wert

Ein String.

Beispiele

In diesem Beispiel wurde das aria-roledescription-Attribut auf dem Element mit der ID myApplication gesetzt. Mit ariaRoleDescription können wir den Wert aktualisieren.

html
<div
  id="myApplication"
  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"

Spezifikationen

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

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
ariaRoleDescription

Legend

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

Full support
Full support

Siehe auch