SIA-R42Elements with a role have required parent

Accessibility requirements

This rule tests conformance of the following accessibility requirements:

Description

This rule checks that an element with a semantic role exists inside its required context.

Applicability

This rule applies to every element in the HTML or SVG namespace that is included in the accessibility tree and has a semantic role with one or more required context roles.

Expectations

  1. The element has a parent in the accessibility tree with a semantic role that is one of the required context roles of the semantic role of the target element.

Assumptions

This rule makes no assumptions.

Accessibility support

This rule has the following accessibility support concerns:

  • User agents do not all have the same accessibility tree. Particularly the method of deriving which element owns which other elements varies between browsers. This can lead to different results for this rule, depending on which accessibility tree is used as input.

  • aria-owns has limited support in some user agents.

Examples

Acknowledgments

This document includes material copied from or derived from https://www.w3.org/WAI/standards-guidelines/act/rules/ff89c9/. Copyright © 2024 W3C® (MIT, ERCIM, Keio, Beihang).