このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。

View in English Always switch to English

Element: ariaDescription プロパティ

Baseline 2024
Newly available

Since ⁨March 2024⁩, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

ariaDescriptionElement インターフェイスのプロパティで、aria-description 属性の値を反映し、この属性は、現在の要素を記述したり、注釈を付けたりする文字列値を定義します。

文字列です。

この例では、ID が close-button の要素の aria-description 属性に文字列 "A longer description of the function of this element" が設定されています。ariaDescription を用いて値を更新することができます。

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" 

仕様書

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

ブラウザーの互換性