SIA-R17Elements with aria-hidden="true" are not focusable

Accessibility requirements

This rule tests conformance of the following accessibility requirements:

Description

This rule checks that elements that have been excluded from the accessibility tree using the aria-hidden attribute with a value of true are not, nor have descendants that are, focusable.

Applicability

This rule applies to every element with an aria-hidden attribute with a value of true.

Expectations

  1. The element is not focusable.

  2. The element does not have descendants in the flat tree that are focusable.

Assumptions

This rule makes no assumptions.

Accessibility support

This rule has no known accessibility support concerns.

Examples

Passed

This element has been excluded from the accessibility tree but is not focusable and therefore passes the rule:

<div aria-hidden="true">
    <p>This is some text</p>
</div>

This otherwise focusable element has been excluded from the accessibility tree and made unfocusable using a negative tabindex and therefore passes the rule:

<button aria-hidden="true" tabindex="-1">This is a button</button>

Failed

This element has been excluded from the accessibility tree but is still focusable and therefore fails the rule:

<button aria-hidden="true">This is a button</button>

Inapplicable

This element has not been excluded from the accessibility tree and is therefore inapplicable:

<button>This is a button</button>

Acknowledgments

This document includes material copied from or derived from https://act-rules.github.io/rules/6cfa84/. Copyright © 2021 W3C® (MIT, ERCIM, Keio, Beihang).