Skip to content
24 changes: 17 additions & 7 deletions _rules/aria-required-owned-element-bc4a75.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ acknowledgments:

## Applicability

This rule applies to any [HTML or SVG element][] that is [included in the accessibility tree][] and has a [WAI-ARIA 1.2][] [explicit 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`.
This rule applies to any [HTML or SVG element][] that is [included in the accessibility tree][] and has a [WAI-ARIA 1.2][] [explicit or implicit 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`.
Comment thread
shunguoy marked this conversation as resolved.
Outdated

## Expectation

Expand Down Expand Up @@ -93,8 +93,8 @@ This element with the `menu` role only owns elements with the `menuitem`, `menui

```html
<div role="menu">
<li role="none"></li>
<li role="menuitem">Item 1</li>
<div role="none"></div>
<div role="menuitem">Item 1</div>
Comment on lines -96 to +97
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no reason to change this. This is an important example to demonstrate explicit roles override implicit ones.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was in the original suggestion, I didn't hear objection during the discussion (I could be wrong). Per HTML 5, the li can only be used as a child of ul, ol, or menu. Otherwise, no list relationship is defined:

The li element represents a list item. If its parent element is an ol, ul, or menu element, then the element is an item of the parent element's list, as defined for those elements. Otherwise, the list item has no defined list-related relationship to any other li element.

This change is to make sure no confusion on the relationship, and maintain the purpose of the example at the same time.

<div role="menuitemradio" aria-checked="false">Item 2</div>
<div role="menuitemcheckbox" aria-checked="false">Item 3</div>
</div>
Expand Down Expand Up @@ -139,6 +139,16 @@ This element with the `menu` role only owns an element with a `group` role. The
</div>
```

#### Passed Example 7

The element `ul` with an implicit `list` role owns an element `li` with an implicit role `listitem` role.

```html
<ul>
<li>Item 1</li>
</ul>
```

### Failed
Comment thread
shunguoy marked this conversation as resolved.

#### Failed Example 1
Expand Down Expand Up @@ -237,12 +247,12 @@ This element with the `list` role is not included in the accessibility tree beca

#### Inapplicable Example 2

This `ul` element does not have an [explicit semantic role][].
This `div` element with the `list` role is not included in the accessibility tree because it is hidden .

```html
<ul>
<li>Item 1</li>
</ul>
<div role="list" hidden>
<div role="listitem">Item 1</div>
</div>
```

#### Inapplicable Example 3
Expand Down
Loading