Element: ariaHidden プロパティ
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.
ariaHidden
は Element
インターフェイスのプロパティで、aria-hidden
属性の値を反映し、要素がアクセシビリティ API に公開されているかどうかを示します。
値
以下のいずれかの値を持つ文字列です。
"true"
-
この要素はアクセシビリティ API から隠されています。
"false"
-
要素は、あたかもレンダリングされたかのようにアクセシビリティ API に公開されます。
"undefined"
-
要素の非表示状態は、それがレンダリングされているかどうかに基づいてユーザーエージェントによって決定されます。
例
この例では、ID が hidden
の要素の aria-hidden
属性は "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 |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
ariaHidden |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.