Element: ariaHidden プロパティ
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.
ariaHidden
は Element
インターフェイスのプロパティで、aria-hidden
(en-US) 属性の値を反映し、要素がアクセシビリティ API に公開されているかどうかを示します。
値
例
この例では、ID が hidden
の要素の aria-hidden
(en-US) 属性は "true" に設定されています。ariaHidden
を使用して値を "false" に更新します。
html
<div id="hidden" aria-hidden="true">Some things are better left unsaid.</div>
js
let el = document.getElementById("hidden");
console.log(el.ariaHidden); // true
el.ariaHidden = "false";
console.log(el.ariaHidden); // false
仕様書
Specification |
---|
Accessible Rich Internet Applications (WAI-ARIA) # dom-ariamixin-ariahidden |
ブラウザーの互換性
BCD tables only load in the browser