Element: ariaRelevant プロパティ

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.

非標準: この機能は標準ではなく、標準化の予定もありません。公開されているウェブサイトには使用しないでください。ユーザーによっては使用できないことがあります。実装ごとに大きな差があることもあり、将来は振る舞いが変わるかもしれません。

ariaRelevantElement インターフェイスのプロパティで、aria-relevant 属性の値を反映します。この属性は、ライブ領域内のアクセシビリティツリーが変更されたときにユーザーエージェントがどのような通知を発生させるかを示します。これは aria-live 領域内のどのような変更が関連性があり、告知されるべきかを記述するために使用します。

以下の値を 1 つ以上格納した文字列で、スペース区切りです。

"additions"

ライブ領域内の要素ノードの追加は、関連性があると考えるべきです。

"removals"

ライブ領域からのノードの削除は、関連性があると考えるべきです。

"text"

既存のノードのテキストコンテンツの変更は、関連性があるとみなされるべきです。

"all"

"additions removals text" に相当します。

この例では、IDが text の要素の aria-relevant 属性は "all" に設定されています。ariaRelevant` を使用して値を "text" に更新します。

html
<div
  id="clock"
  role="timer"
  aria-live="polite"
  aria-atomic="true"
  aria-relevant="all"></div>
js
let el = document.getElementById("clock");
console.log(el.ariaRelevant); // all
el.ariaRelevant = "text";
console.log(el.ariaRelevant); // text

ブラウザーの互換性

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
ariaRelevant
Non-standard

Legend

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

Full support
Full support
Non-standard. Check cross-browser support before using.