Skip to content

Commit b4abd2a

Browse files
Update aria-required-accessible-name-gp8n89.md
1 parent 27ece2d commit b4abd2a

File tree

1 file changed

+5
-36
lines changed

1 file changed

+5
-36
lines changed

_rules/aria-required-accessible-name-gp8n89.md

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -109,32 +109,21 @@ The `div` element with role `checkbox` has an [accessible name][] provided thank
109109

110110
#### Passed Example 5
111111

112-
The `div` element with role `dialog` has an [accessible name][] provided by the `aria-labelledby` attribute.
113-
114-
```html
115-
<div role="dialog" aria-modal="true" tabindex="-1" aria-labelledby="pass-terms">
116-
<h1 id="pass-terms">Terms</h1>
117-
<p>These are our terms.</p>
118-
</div>
119-
```
120-
121-
#### Passed Example 6
122-
123112
The `div` element with role `heading` has an [accessible name][] provided by its content.
124113

125114
```html
126115
<div role="heading" aria-level="1">Terms</div>
127116
```
128117

129-
#### Passed Example 7
118+
#### Passed Example 6
130119

131120
This `div` element with role `heading` is not [visible][], but is still [included in the accessibility tree][]. It has a non-empty [accessible name][] provided by its content.
132121

133122
```html
134123
<div role="heading" aria-level="1" style="position: absolute; left: -9999px">ACT rules</div>
135124
```
136125

137-
#### Passed Example 8
126+
#### Passed Example 7
138127

139128
The `div` element with role `link` has an [accessible name][] provided by its content.
140129

@@ -181,49 +170,29 @@ The `div` element with role `checkbox` doesn't have an [accessible name][].
181170

182171
#### Failed Example 5
183172

184-
The `dialog` role accepts an [accessible name][] only from the author and not from its content. Therefore, the `div` element with role `dialog` doesn't have an [accessible name][].
185-
186-
```html
187-
<div role="dialog" aria-modal="true" tabindex="-1">
188-
<h1>Terms</h1>
189-
<p>These are our terms.</p>
190-
</div>
191-
```
192-
193-
#### Failed Example 6
194-
195173
The `div` element with role `heading` has an empty [accessible name][] due to the `display: none` CSS property set to its content.
196174

197175
```html
198176
<div role="heading" aria-level="1"><span style="display: none">Terms</span></div>
199177
```
200178

201-
#### Failed Example 7
202-
203-
The `button` element has an empty [accessible name][] given by its `aria-labelledby` attribute.
204-
205-
```html
206-
<span id="fail-heading"></span>
207-
<button aria-labelledby="fail-heading">Submit</button>
208-
```
209-
210-
#### Failed Example 8
179+
#### Failed Example 6
211180

212181
The `div` element with role `button` has an empty [accessible name][] because the `value` attribute does not count in the computation of the [accessible name][].
213182

214183
```html
215184
<div role="button" value="test"></div>
216185
```
217186

218-
#### Failed Example 9
187+
#### Failed Example 7
219188

220189
This `div` element with role `button` is not [visible][], but is still [included in the accessibility tree][]. It doesn't have an [accessible name][], therefore failing the rule.
221190

222191
```html
223192
<div role="button" style="position: absolute; left: -9999px" tabindex="0"></div>
224193
```
225194

226-
#### Failed Example 10
195+
#### Failed Example 8
227196

228197
The `div` element with role `link` has an empty [accessible name][].
229198

0 commit comments

Comments
 (0)