Element: ariaCurrent プロパティ
Baseline 2023Newly available
Since October 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
ariaCurrent
は Element
インターフェイスのプロパティで、aria-current
属性の値を反映し、コンテナーや関連する要素の集合の中で現在の項目を表します。
値
例
この例では、リンクの集合がサイトナビゲーションに使用されています。aria-current
属性は現在のページを示します。値 page
はスクリーンリーダーのアナウンスに組み込まれています。ariaCurrent
を用いて、その値を更新することができます。
html
js
let el = document.getElementById("link-home");
console.log(el.ariaCurrent); // "page"
el.ariaCurrent = "tab";
console.log(el.ariaCurrent); // "tab"
仕様書
Specification |
---|
Accessible Rich Internet Applications (WAI-ARIA) # dom-ariamixin-ariacurrent |