Element: ariaRoleDescription 屬性
Element 介面的 ariaRoleDescription 屬性反映了 aria-roledescription 屬性的值,該屬性為元素的角色定義了一個人類可讀的、作者本地化的描述。
值
字串。
示例
在此示例中,ID 為 myApplication 的元素的 aria-roledescription 屬性已設定。使用 ariaRoleDescription 我們可以更新該值。
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"
規範
| 規範 |
|---|
| 無障礙富網際網路應用程式 (WAI-ARIA) # dom-ariamixin-ariaorientation |
瀏覽器相容性
載入中…