-
Notifications
You must be signed in to change notification settings - Fork 70
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
Rule: ARIA required context role (ff89c9) #255
Changes from 2 commits
4b2cd9a
bdbfbeb
f80607d
409bb9a
8f79ac6
4f4701d
7b43dde
2ac617f
ded2be6
8a81b50
1542f48
b9b79a8
8bf6038
dfc56b2
c2ccbc1
35d480e
9835b44
d92d89c
16f50c7
47e4ce5
96472af
0785f09
9c81dcd
52a4b1e
4339973
5c7b137
127beb4
473016f
b952555
dc50845
542090d
31a7bf1
576eb0d
c031c89
8d08752
08069fa
7578413
b360785
4b13b65
922d3e8
33d0f44
e9f8a8a
1a6d693
9a6da41
6839767
376ce5f
9b73e57
87777d3
476a2e6
4ff8e00
b7e25e0
c41e314
78169f8
ee977ac
c41dfe3
8f62229
32b92de
07ba91a
191b5cc
c4e760e
f152e32
8262e3a
4efedba
1af2679
45f5648
ca84d89
89aee3c
f4f5188
5b45798
e3db62e
5cbc373
7362c00
5db02eb
b8519e1
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 |
---|---|---|
@@ -0,0 +1,145 @@ | ||
--- | ||
name: ARIA required context role | ||
description: | | ||
This rule checks that a role does not exist outside of its required context roles | ||
|
||
success_criterion: | ||
- 1.3.1 # Info and Relationships | ||
|
||
test_aspects: | ||
- DOM Tree | ||
- CSS Styling | ||
|
||
authors: | ||
- Anne Thyme Nørregaard | ||
--- | ||
|
||
## Test procedure | ||
|
||
### Applicability | ||
|
||
The rule applies to any HTML or SVG element that is [exposed to assistive technologies](#exposed-to-assistive-technologies) and has an explicit [semantic role](#semantic-role) that has [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) listed for that role in [WAI-ARIA](https://www.w3.org/TR/wai-aria). | ||
jeeyyy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Expectation | ||
|
||
Each target element is [owned](https://www.w3.org/TR/wai-aria-1.1/#dfn-owned-element) by an element that is [exposed to assistive technologies](#exposed-to-assistive-technologies) and has a [semantic role](#semantic-role) matching one of the [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) listed for that role in [WAI-ARIA](https://www.w3.org/TR/wai-aria). | ||
jeeyyy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Assumptions | ||
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
Sorry, something went wrong. |
||
|
||
_There are currently no assumptions_ | ||
|
||
## Accessibility Support | ||
|
||
When a required owned element is not a child, but rather a descendant, certain AT have issues recognizing the owned element. | ||
jeeyyy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Background | ||
|
||
- [Required Context Role](https://www.w3.org/TR/wai-aria-1.1/#scope) | ||
|
||
## Test Cases | ||
|
||
### Passed | ||
|
||
#### Passed example 1 | ||
|
||
Element with role ´listitem´ is contained within its required context role ´list´, expressed as an explicit role. | ||
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.
|
||
|
||
```html | ||
<div role="list"> | ||
<div role="listitem"></div> | ||
</div> | ||
``` | ||
|
||
#### Passed example 2 | ||
|
||
Multiple levels of required context roles. | ||
jeeyyy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
```html | ||
<div role="table"> | ||
<div role="row"> | ||
<div role="cell"></div> | ||
</div> | ||
</div> | ||
</div> | ||
``` | ||
|
||
#### Passed example 3 | ||
|
||
Element with role ´listitem´ is contained within its required context role ´list´, through the implicit role of ´ul´. | ||
|
||
```html | ||
<ul> | ||
<div role="listitem"></div> | ||
</ul> | ||
``` | ||
|
||
#### Passed example 4 | ||
|
||
Element contained within its required context role even though it is not a direct child of the context role. | ||
|
||
```html | ||
<div role="list"> | ||
<div> | ||
<div> | ||
<div> | ||
<div role="listitem"></div> | ||
jeeyyy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</div> | ||
<div> | ||
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. These two |
||
<div> | ||
</div> | ||
``` | ||
|
||
### Failed | ||
|
||
#### Failed example 1 | ||
|
||
No context role. | ||
|
||
```html | ||
<div role="listitem"></div> | ||
``` | ||
|
||
#### Failed example 2 | ||
|
||
Wrong context role | ||
|
||
```html | ||
<div role="tablist"> | ||
<div role="listitem"></div> | ||
</div> | ||
``` | ||
|
||
#### Failed example 3 | ||
|
||
Element not contained within its required context role. | ||
|
||
```html | ||
<div role="list"></div> | ||
<div role="listitem"></div> | ||
``` | ||
|
||
### Inapplicable | ||
|
||
#### Inapplicable example 1 | ||
|
||
Element does not have an explicit semantic role | ||
|
||
```html | ||
<ul></ul> | ||
``` | ||
|
||
#### Inapplicable example 2 | ||
|
||
Element is not exposed to assistive technologies. | ||
|
||
```html | ||
<div role="tab" aria-hidden="true"></div> | ||
``` | ||
|
||
#### Inapplicable example 3 | ||
|
||
Role does not have any required context roles listed in WAI-ARIA spec. | ||
|
||
```html | ||
<div role="radio"></div> | ||
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. Per the #546 , this test case is missing an accessible name to conform to SC 1.3.1 . Moreover, the Proposal <label for="control-radio"> A radio control</label>
<div role="radio" aria-checked="true" id="control-radio"></div> 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 would say it actually doesn't. The rule Form field has an accessible name is only for 4.1.2. It's not that I don't want to put it on, but then at least also the |
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update to the new format.