You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _rules/presentational-children-no-focusable-content-307n5z.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ This rule assumes that elements that are part of [sequential focus navigation][]
43
43
44
44
Several major browsers ignore the WAI-ARIA requirements on [presentational children][] for most or sometimes all roles, or in presence of focusable content. Since some browsers implement presentational children while others do not, pages failing this rule may only be problematic with some browsers.
45
45
46
-
This rule is often misunderstood as applying to elements with an _explicit_ role of `presentation`. In fact, this rule only applies to elements which have been given an _implicit_ role of `presentation` through the [presentational children][] mechanism. Similarly, this rule does not apply to elements with `aria-hidden="true"`.
46
+
This rule is often misunderstood as applying to elements with an _explicit_ role of `presentation`. In fact, this rule only applies to elements which have been given an _implicit_ role of `presentation` through the [presentational children][] mechanism. Similarly, this rule does not apply to elements with `aria-hidden="true"`.
47
47
48
48
### Related rules
49
49
@@ -97,12 +97,13 @@ This element with the `menuitemcheckbox` role has an `input` element as a descen
97
97
98
98
#### Passed Example 4
99
99
100
-
This `<button>` element has an `a` element as a [child][]. The `a` element has no `href` attribute, so it isn't included in [sequential focus navigation][]. So this `button` element passes the rule.
100
+
This `<button>` element has an `a` element as a [child][]. The `a` element has no `href` attribute, so it isn't included in [sequential focus navigation][]. So this `button` element passes the rule.
101
101
102
102
```html
103
103
<button><a>button/link</a></button>
104
104
```
105
105
106
+
106
107
### Failed
107
108
108
109
#### Failed Example 1
@@ -139,7 +140,7 @@ This element with the `menuitemcheckbox` role has a checkbox as a child. Because
139
140
140
141
#### Failed Example 4
141
142
142
-
This element with the `tab` role contains an `a` element. The `tab` role has [presentational children][]. The `a` element is included in [sequential focus navigation][]. So the element with the `tab` role fails the rule. (This tablist implementation is non-functional for users. It's not meant to function - it's only meant to show roles.)
143
+
This element with the `tab` role contains an `a` element. The `tab` role has [presentational children][]. The `a` element is included in [sequential focus navigation][]. So the element with the `tab` role fails the rule. (This tablist implementation is non-functional for users. It's not meant to function - it's only meant to show roles.)
143
144
144
145
```html
145
146
<ulrole="tablist">
@@ -151,7 +152,7 @@ This element with the `tab` role contains an `a` element. The `tab` role has [pr
151
152
152
153
#### Failed Example 5
153
154
154
-
This element with the `img` role contains an `a` element. The `img` role has [presentational children][]. The `a` element is included in [sequential focus navigation][]. So the element with the `img` role fails the rule.
155
+
This element with the `img` role contains an `a` element. The `img` role has [presentational children][]. The `a` element is included in [sequential focus navigation][]. So the element with the `img` role fails the rule.
155
156
156
157
```html
157
158
<spanrole="img"aria-label="some ASCII art">****** This ASCII art ******* <ahref="#">contains a link.</a></span>
@@ -161,7 +162,7 @@ This element with the `img` role contains an `a` element. The `img` role has [pr
161
162
162
163
#### Inapplicable Example 1
163
164
164
-
None of the roles that build this semantic table structure (`table` for `table`, `row` for `tr`, `columnheader` for `th`, and `cell` for `td`) have [presentational children][]. So this rule does not apply to them.
165
+
None of the roles that build this semantic table structure (`table` for `table`, `row` for `tr`, `columnheader` for `th`, and `cell` for `td`) have [presentational children][]. So this rule does not apply to them.
165
166
166
167
```html
167
168
<table>
@@ -180,7 +181,7 @@ None of the roles that build this semantic table structure (`table` for `table`,
180
181
181
182
#### Inapplicable Example 2
182
183
183
-
This `a` element has a `link` role, which does not have [presentational children][]. So this `a` element does not fail this rule, because it's inapplicable. To have a "focusable element within a focusable element" like this is a bad practice, but this rule doesn't directly check for it.
184
+
This `a` element has a `link` role, which does not have [presentational children][]. So this `a` element does not fail this rule, because it's inapplicable. To have a "focusable element within a focusable element" like this is a bad practice, but this rule doesn't directly check for it.
@@ -197,7 +197,7 @@ This `div` does not have a [semantic role](#semantic-role).
197
197
This `checkbox` has an [implicit semantic role](#implicit-role) that is identical to the [explicit semantic role](#explicit-role). This allows native HTML `checked` attribute to apply.
0 commit comments