-
Notifications
You must be signed in to change notification settings - Fork 82
Update the aria-required-owned rule [bc4a75] to include the elements with implicit roles #2318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
4fe5eb3
834c355
f80ebcb
e248047
b10da17
ccb1ec2
a209462
9dc4c6d
c723534
5c5e282
488c53a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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`. | ||
|
|
||
| ## Expectation | ||
|
|
||
|
|
@@ -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
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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:
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> | ||
|
|
@@ -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 | ||
|
shunguoy marked this conversation as resolved.
|
||
|
|
||
| #### Failed Example 1 | ||
|
|
@@ -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 | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.