Skip to content

Commit 25d2111

Browse files
Create aria-presentational-role-not-focusable-18pg11.md
1 parent 24a9bcd commit 25d2111

File tree

1 file changed

+140
-0
lines changed

1 file changed

+140
-0
lines changed
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
---
2+
id: 18pg11
3+
name: ARIA presentational role not focusable
4+
rule_type: atomic
5+
description: |
6+
This rule checks that elements with ARIA presentational role are not focusable
7+
accessibility_requirements:
8+
aria12:conflict_resolution_presentation_none:
9+
title: ARIA 1.2, Presentational Roles Conflict Resolution
10+
forConformance: true
11+
failed: not satisfied
12+
passed: satisfied
13+
inapplicable: satisfied
14+
wcag20:1.3.1: # Info and Relationships (A)
15+
secondary: This success criterion is **related** to this rule. This is because elements assigned a presentational role but are still focusable remain exposed in the accessibility tree with their implicit role, potentially leading to WCAG violations. Some of the examples that either pass or fail overlap with this success criterion.
16+
wcag20:2.4.3: # Focus Order (A)
17+
secondary: This success criterion is **related** to this rule. This is because elements assigned a presentational role but are still focusable might create unnecessary and unclear focus targets. Some of the examples that either pass or fail overlap with this success criterion.
18+
input_aspects:
19+
- Accessibility Tree
20+
- CSS styling
21+
- DOM Tree
22+
acknowledgments:
23+
authors:
24+
- Giacomo Petri
25+
---
26+
27+
## Applicability
28+
29+
This rule applies to any [HTML or SVG element][] that is [included in the accessibility tree][] and has an [explicit semantic role][] or [inherited semantic role][] of `none` or `presentation`.
30+
31+
## Expectation
32+
33+
Each target element is not [focusable][].
34+
35+
## Assumptions
36+
37+
There are no assumptions.
38+
39+
## Accessibility Support
40+
41+
A common browser, even though an interactive element with explicit presentational role is not focusable, still expose the element with its implicit role.
42+
43+
## Background
44+
45+
While user agents consistently handle elements undergoing [Presentational Roles Conflict Resolution][], authors bear the responsibility of preventing such conflicts.
46+
47+
### Bibliography
48+
49+
- [WAI-ARIA 1.2 - Presentational Roles Conflict Resolution][Presentational Roles Conflict Resolution]
50+
51+
## Test Cases
52+
53+
### Passed
54+
55+
#### Passed Example 1
56+
57+
The `button` element with role `none` is not [focusable][].
58+
59+
```html
60+
<button role="none" disabled>Submit</button>
61+
```
62+
63+
#### Passed Example 2
64+
65+
The `img` element with role `presentation` is not [focusable][].
66+
67+
```html
68+
<img role="presentation" src="" alt="">
69+
```
70+
71+
#### Passed Example 3
72+
73+
The `div` element with role `img` has an [inherited semantic role][] of `none` and is not [focusable][].
74+
75+
```html
76+
<button>
77+
<div role="img"></div>
78+
</button>
79+
```
80+
81+
### Failed
82+
83+
#### Failed Example 1
84+
85+
The `button` element with role attribute value `presentation` is [focusable][].
86+
87+
```html
88+
<button role="presentation">Submit</button>
89+
```
90+
91+
#### Failed Example 2
92+
93+
The `button` element with role attribute value `none` is not tabbable but still [focusable][].
94+
95+
```html
96+
<button role="none" tabindex="-1">Submit</button>
97+
```
98+
99+
#### Failed Example 3
100+
101+
The `button` element with an [inherited semantic role][] of `none` is [focusable][].
102+
103+
```html
104+
<a href="https://www.w3.org/WAI/standards-guidelines/act/rules/">
105+
<button>All ACT Rules</button>
106+
</a>
107+
```
108+
109+
### Inapplicable
110+
111+
#### Inapplicable Example 1
112+
113+
This `button` element doesn't have neither an [explicit semantic role][] or [inherited semantic role][] of `none` or `presentation`.
114+
115+
```html
116+
<button>Submit</button>
117+
```
118+
119+
#### Inapplicable Example 2
120+
121+
This `div` element has an [explicit semantic role][] of `button`, which differs from `none` or `presentation` roles.
122+
123+
```html
124+
<div role="button">Submit</div>
125+
```
126+
127+
#### Inapplicable Example 3
128+
129+
This `button` element with role `none` is not included in the accessibility tree.
130+
131+
```html
132+
<button role="none" style="display:none">Submit</button>
133+
```
134+
135+
[explicit semantic role]: #explicit-role 'Definition of Explicit Role'
136+
[inherited semantic role]: https://w3c.github.io/aria/#presentational-role-inheritance
137+
[included in the accessibility tree]: #included-in-the-accessibility-tree 'Definition of Included in the Accessibility Tree'
138+
[presentational roles conflict resolution]: https://www.w3.org/TR/wai-aria-1.2/#conflict_resolution_presentation_none 'Presentational Roles Conflict Resolution'
139+
[wai-aria 1.2]: https://www.w3.org/TR/wai-aria-1.2/
140+
[html or svg element]: #namespaced-element

0 commit comments

Comments
 (0)