Assign "false". Exposes it to the accessibility API (MDN).
Use strings only — not boolean literals.
Example 2 — Hide a Decorative Icon from AT
Keep the icon on screen for sighted users; hide it from assistive tech.
JavaScript
const icon = document.getElementById("star-icon");
icon.ariaHidden = "true";
console.log(icon.ariaHidden); // "true"
// Nearby text still provides the accessible name
Assign the string "undefined". Not the JS value alone.
Meaning (MDN): the UA decides from whether the element is rendered.
Prefer omitting the attribute when you do not need an override.
Use "true"/"false" only when you must force AT exposure.
Compatibility
Browser Support
Element.ariaHidden is Baseline Widely available (MDN: since October 2023). Safe for modern evergreen browsers.
✓ Baseline · Widely available
ariaHidden
Reflects aria-hidden for accessibility API exposure.
99%Widely available
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
ariaHiddenExcellent
Bottom line: Use string values. Never leave focusable content inside aria-hidden="true". Pair with visual hide when needed.
Frequently Asked Questions
It reflects the aria-hidden attribute as a string, indicating whether the element is exposed to an accessibility API (MDN).
No. MDN marks Element.ariaHidden as Baseline Widely available (since October 2023). It is not Deprecated, Experimental, or Non-standard.
The strings "true" (hidden from the accessibility API), "false" (exposed as if rendered), or "undefined" (user agent decides based on whether it is rendered) (MDN).
No. CSS can hide content visually. aria-hidden="true" hides content from assistive technologies even if it remains visible. Prefer removing or inerting content you do not want announced, and never leave focusable controls inside aria-hidden="true".
The element's accessibility hidden state is determined by the user agent based on whether the element is rendered (MDN).
Yes. Custom elements can use ElementInternals.ariaHidden for the same reflected value from inside a component (MDN).