Programmatically hidden
An HTML element is programmatically hidden if
- either the computed value of its
visibility
property is notvisible
; or - any of its inclusive ancestors in the flat tree:
- has a computed value of its
display
property ofnone
; or - has an
aria-hidden
state value oftrue
- has a computed value of its
Note: Contrarily to the other conditions, the
visibility
property may be reverted by descendants.
Note: The HTML standard suggests rendering elements with the
hidden
attribute with a CSS rule that applies the valuenone
to thedisplay
property. Although the suggestion is not normative, known user agents render it according to the suggestion (unless the content specifies another rule that overrides the value of thedisplay
property). If a user agent does not follow the suggestion, this definition may produce incorrect results for this user agent.
Note: Elements that are programmatically hidden are completely ignored by assistive technologies. This is different from not being included in the accessibility tree because some elements with no semantic meaning (containers) are not included in the accessibility tree without being programmatically hidden. For example
<span>Hello</span>
is not programmatically hidden, but is not included in the accessibility tree either since it has no role.