| id | bc4a75 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| name | ARIA required owned elements | ||||||||||
| rules_format | 1.1 | ||||||||||
| rule_type | atomic | ||||||||||
| description | This rule checks that an element with a semantic role that restricts which elements it can own only owns such elements. | ||||||||||
| accessibility_requirements |
|
||||||||||
| input_aspects |
|
||||||||||
| acknowledgments |
|
This rule applies to any HTML or SVG element that is included in the accessibility tree and has a WAI-ARIA 1.2 semantic role with required owned elements, except if the element has an inclusive ancestor in the accessibility tree with an aria-busy attribute value of true.
Each test target only owns elements with a semantic role from the required owned element list for the test target's semantic role.
Note: The definition of owned by used in this rule is different than the definition of "owned element" in WAI-ARIA. See more in the owned by definition.
Some required owned elements are only valid if they themselves own (or "contain") elements with a given semantic role. This is denoted by an arrow (meaning "containing") in the role description. For example, the role menu has group → menuitemradio as one of its required owned elements, meaning that elements with a role of menu may only own elements with a role of group who themselves only own elements with a role of menuitemradio.
The applicability of this rule is limited to the WAI-ARIA 1.2 Recommendation roles. The WAI-ARIA Graphics Module and Digital Publishing WAI-ARIA Module (DPUB ARIA) 1.1 (Editors draft) do not include any required owned elements.
Note: Subclass roles of required owned elements are not automatically included as possible required owned elements. For example, the treeitem role is not a required owned elements for list, even though treeitem is a subclass role of listitem.
If the semantic role on the target element is incorrectly used, and any relationships between elements are already programmatically determinable, failing this rule may not result in accessibility issues for users of assistive technologies, and it should then not be considered a failure under WCAG success criterion 1.3.1 Info and Relationships.
- 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-ownshas limited support in some user agents.- Assistive technologies are not consistent in how they handle situations where a required owned element has a missing or incorrect role. This can lead to situations where inaccurate owned elements behave as expected in one assistive technology, but not in another.
- Some user agents treat the value of
aria-busyas case-sensitive.
This element with the list role only owns elements with the listitem role. The listitem role is one of the required owned elements for list.
<div role="list">
<span role="listitem">Item 1</span>
<span role="listitem">Item 2</span>
</div>This element with the grid role only owns elements with the row role, and the element with the row role only owns elements with the gridcell role. The row role is one of the required owned elements for grid, and gridcell is one of the required owned elements for row.
<table role="grid" aria-label="grid name">
<tr role="row">
<td role="gridcell">Item 1</td>
</tr>
</table>This element with the menu role only owns elements with the menuitem, menuitemradio and menuitemcheckbox role. These roles are all required owned elements for menu. The element with the none role is not owned by the menu because it is not included in the accessibility tree.
<div role="menu">
<div role="none"></div>
<div role="menuitem">Item 1</div>
<div role="menuitemradio" aria-checked="false">Item 2</div>
<div role="menuitemcheckbox" aria-checked="false">Item 3</div>
</div>This element with the tablist role only owns elements with the tab role. The tab role is one of the required owned elements for tablist. The li element is ignored because it has an semantic role of none.
<ul role="tablist">
<li role="none">
<span role="tab">Tab 1</span>
</li>
</ul>This element with the list role only owns elements with the listitem role through the aria-owns attribute. The listitem role is one of the required owned elements for list.
Note: This test case follows the definition of owned by. If implemented differently, this definition could cause differences in outcome of this test case.
<div role="list" aria-owns="id1"></div>
<div id="id1" role="listitem">Item 1</div>This element with the menu role only owns an element with a group role. The group in turn owns an element with the menuitem role, and an element with the group role, in which each element has the menuitem role. ARIA group roles are allowed to own other elements with a group role.
<div role="menu">
<div role="group">
<span role="menuitem">Item 1</span>
<div role="group">
<span role="menuitem">Item 2</span>
<span role="menuitem">Item 3</span>
</div>
</div>
</div>The element ul with an implicit list role owns an element li with an implicit listitem role.
<ul>
<li>Item 1</li>
</ul>The element select with an implicit listbox role owns elements option with implicit option roles.
<select multiple>
<option>Item 1</option>
<option>Item 2</option>
<option>Item 3</option>
</select>The element table with an implicit table role owns an element tr with implicit row role that in turn owns elements td with implicit cell roles.
<table>
<tr>
<td>Item 1</td>
<td>Item 2</td>
<td>Item 3</td>
</tr>
</table>The element table with an explicit treegrid role owns an element tr with implicit row role that in turn owns elements td with implicit gridcell roles.
<table role="treegrid" aria-label="a test grid">
<tr>
<td>Item 1</td>
<td>Item 2</td>
<td>Item 3</td>
</tr>
</table>This element with the list role owns an element which is not a listitem required owned elements.
<div role="list">
<span>Item 1</span>
</div>This element with the tablist role owns an element with the listitem role. The listitem role is not one of the required owned elements for tablist.
<ol role="tablist">
<li role="listitem">Item 1</li>
</ol>This element with the list role owns an element with the listitem role, and one with the link role. The link role is not one of the required owned elements for list.
<div role="list">
<li>Item 1</li>
<span role="link">Item 2</span>
</div>This element with the grid role only owns elements with the row role, but the element with the row role does not own any of its required owned elements.
<div role="grid">
<div role="row">
<span>Item 1</span>
</div>
</div>This element with the list role owns an element with the tab role through the aria-owns attribute. The tab role is not one of the required owned elements for list.
Note: This test case follows the definition of owned by. If implemented differently, this definition could cause differences in outcome of this test case.
<div role="list" aria-owns="id2"></div>
<div id="id2" role="tab">Tab 1</div>This element with the menu role only owns an element with a group role. The group in turn owns an element with the menuitem role, and an element with the group role, in which each element has the treeitem role. ARIA group roles are allowed to own other elements with a group role, but those nested group nodes must still meet the requirements.
<div role="menu">
<div role="group">
<span role="menuitem">Item 1</span>
<div role="group">
<span role="treeitem">Item 1</span>
<span role="treeitem">Item 2</span>
</div>
</div>
</div>This element with the list role owns an element with the listitem role and an element with the group role, in which each element has the listitem role. The group role is no longer a required owned element for the list role.
<div role="list">
<span role="listitem">Item 1</span>
<div role="group">
<span role="listitem">Item 2</span>
<span role="listitem">Item 3</span>
</div>
</div>This element with the menu role owns option elements with implicit option role. The option role is not one of the required owned elements for menu.
<select role="menu" aria-label="a test menu">
<option>Item 1</option>
<option>Item 2</option>
<option>Item 3</option>
</select>This element with the menu role owns tr elements with an explicit list role. The list role is not one of the required owned elements for menu. In addition, the tr element with the explicit list role owns td elements with explicit menuitem roles. The menuitem role is not one of the required owned elements for list.
<table role="menu" aria-label="a test table" aria-activedescendant="item1" tabindex="0">
<tr role="list">
<td id="item1" role="menuitem">Item 1</td>
<td id="item2" role="menuitem">Item 2</td>
<td id="item3" role="menuitem">Item 3</td>
</tr>
</table>This element with the implicit list role owns an element with the implicit generic role. The generic role is not one of the required owned elements for list. Note that this example is for demonstration purpose only because it's not a valid HTML 5 structure.
<ul>
<div></div>
<div></div>
</ul>This element with the list role is not included in the accessibility tree because the aria-hidden attribute is set to true.
<div role="list" aria-hidden="true"></div>This div element with the list role is not included in the accessibility tree because it is hidden .
<div role="list" hidden>
<div role="listitem">Item 1</div>
</div>This element with the progressbar role does not need required owned elements.
<div role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" aria-label="Completion">20 %</div>This element with the menu role has an aria-busy attribute set to true.
<ul role="menu" aria-busy="true">
Loading
</ul>