aria-hidden attribute | ariaHidden property
Sets or retrieves the hidden state of this element.
![]() |
Syntax
| HTML |
|---|
<element aria-hidden="p" ... > |
| JavaScript |
|---|
object.setAttribute("aria-hidden",value);var value = object.getAttribute("aria-hidden");
|
Property values
Type: String
The hidden state.
Standards information
- Accessible Rich Internet Applications (WAI-ARIA) 1.0, Section 6.6
Remarks
| Used in Roles |
|
|---|
This ariaHidden state indicates whether an element is visible or hidden.
Note For cross-browser compatibility, always use the WAI-ARIA attribute syntax to access and modify ARIA properties, for example
object.setAttribute("aria-valuenow", newValue). Examples
You can use a CSS rule to show or hide the element based on the value of the aria-hidden state, as shown here:
[aria-hidden=true] {visibility: hidden;}
See also
Show:
