Skip to content

Commit 4f6b10e

Browse files
committed
Add some boundary examples
1 parent 9bc1a89 commit 4f6b10e

5 files changed

+78
-1
lines changed

_rules/aria-required-context-role-ff89c9.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,23 @@ There is no element with an [explicit role][] different from its [implicit role]
239239
</ul>
240240
```
241241

242+
<details>
243+
<sumary>## Boundary Examples</sumary>
244+
245+
These examples are not normative and not require for consistent implementations. They illustrate limitations and boundaries of the rule. Passed and Inapplicable examples in this category are likely to fail the rule's accessibility requirement, showing how the rule is only a partial test. Testing tools and methodologies are encouraged to be more clever than the rule, and to report the correct outcome for these examples. Therefore, they are not required for consistent implementation.
246+
247+
### Inapplicable Examples
248+
249+
#### Inapplicable Example 1
250+
251+
This `li` element has an [explicit role][] identical to its [implicit role][] and therefore is not applicable. This nonetheless doesn't follow ARIA specifications since the resulting `listitem` does not have the required context role of `list`.
252+
253+
```html
254+
<li role="listitem">List item 1</li>
255+
```
256+
257+
</details>
258+
242259
[accessibility tree]: https://www.w3.org/TR/act-rules-aspects/#input-aspects-accessibility 'Definition of accessibility tree'
243260
[aria 1.2]: https://www.w3.org/TR/wai-aria-1.2/ 'WAI ARIA 1.2 specifications'
244261
[content model]: https://html.spec.whatwg.org/multipage/dom.html#concept-element-content-model 'HTML definition of the Content Model'

_rules/html-page-lang-valid-bf051a.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ These examples are not normative and not require for consistent implementations.
147147

148148
#### Inapplicable Example 1
149149

150-
This `html` element has an empty `lang` attribute. It is not applicable for this rule, but nonetheless fails [Success Criterion 3.1.1 Language of Page][sc311]. It also fails rule [HTML page has non-empty title](https://www.w3.org/WAI/standards-guidelines/act/rules/b5c3f8/).
150+
This `html` element has an empty `lang` attribute. It is not applicable for this rule, but nonetheless fails [Success Criterion 3.1.1 Language of Page][sc311]. It also fails rule [HTML page has lang attribute](https://www.w3.org/WAI/standards-guidelines/act/rules/b5c3f8/).
151151

152152
```html
153153
<html lang="">

_rules/image-non-empty-accessible-name-23a2a8.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,23 @@ This `img` element is hidden with `visibility: hidden`.
243243
</div>
244244
```
245245

246+
<details>
247+
<sumary>## Boundary Examples</sumary>
248+
249+
These examples are not normative and not require for consistent implementations. They illustrate limitations and boundaries of the rule. Passed and Inapplicable examples in this category are likely to fail the rule's accessibility requirement, showing how the rule is only a partial test. Testing tools and methodologies are encouraged to be more clever than the rule, and to report the correct outcome for these examples. Therefore, they are not required for consistent implementation.
250+
251+
### Passed Examples
252+
253+
#### Passed Example 1
254+
255+
This `img` element has a non-empty [accessible name][]. The name is not descriptive and therefore the image fails [Success Criterion 1.1.1 Non-text content][sc111], but this rule only check for existence of a name. This `img` also fails rule [Image accessible name is descriptive](https://www.w3.org/WAI/standards-guidelines/act/rules/qt1vmo/).
256+
257+
```html
258+
<img alt="Neil Armstrong walking on the Moon" src="/test-assets/shared/w3c-logo.png" />
259+
```
260+
261+
</details>
262+
246263
[accessible name]: #accessible-name 'Definition of accessible name'
247264
[explicit role]: #explicit-role 'Definition of explicit role'
248265
[focusable]: #focusable 'Definition of focusable'

_rules/visible-label-in-accessible-name-2ee8b8.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,25 @@ This link has no [visible text content][].
196196
</a>
197197
```
198198

199+
<details>
200+
<sumary>## Boundary Examples</sumary>
201+
202+
These examples are not normative and not require for consistent implementations. They illustrate limitations and boundaries of the rule. Passed and Inapplicable examples in this category are likely to fail the rule's accessibility requirement, showing how the rule is only a partial test. Testing tools and methodologies are encouraged to be more clever than the rule, and to report the correct outcome for these examples. Therefore, they are not required for consistent implementation.
203+
204+
### Passed Examples
205+
206+
#### Passed Example 1
207+
208+
These buttons have text nodes that qualify as [non-text content][] and therefore pass this rule. The accessible names are not descriptive, thus they fail [Success Criterion 1.1.1 Non-Text Content](https://www.w3.org/WAI/WCAG22/#non-text-content).
209+
210+
```html
211+
<button aria-label="Save">&lt;</button>
212+
<button aria-label="Close">&gt;</button>
213+
<button aria-label="Hello world">X</button>
214+
```
215+
216+
</details>
217+
199218
[accessible name]: #accessible-name 'Definition of accessible name'
200219
[match characters]: #matching-characters 'Definition of matching characters'
201220
[non-text content]: https://www.w3.org/TR/WCAG22/#dfn-non-text-content 'WCAG Definition of Non-text content'

_rules/zoom-text-no-overflow-clipping-59br37.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,30 @@ This [text node][] with the text "Web Content Accessibility Guidelines 2.1" is f
270270
<a href="/"> Next<span class="mobile-hidden">: Web Content Accessibility Guidelines 2.1</span> </a>
271271
```
272272

273+
<details>
274+
<sumary>## Boundary Examples</sumary>
275+
276+
These examples are not normative and not require for consistent implementations. They illustrate limitations and boundaries of the rule. Passed and Inapplicable examples in this category are likely to fail the rule's accessibility requirement, showing how the rule is only a partial test. Testing tools and methodologies are encouraged to be more clever than the rule, and to report the correct outcome for these examples. Therefore, they are not required for consistent implementation.
277+
278+
### Inapplicable Examples
279+
280+
#### Inapplicable Example 1
281+
282+
None of these [text nodes][text node] has an [ancestor][] with `overflow: hidden` or `clip`. On a viewport of 640 by 512 pixels, the texts overlap and become unreadable, thus this fails [Success Criterion 1.4.4 Resize text](https://www.w3.org/TR/WCAG22/#resize-text). This rule only detects clipping, not overlapping.
283+
284+
```html
285+
<div style="overflow: visible; height: 1.5em; font-size: 16px;">
286+
Once upon a midnight dreary, while I pondered, weak and weary, Over many a quaint and curious volume of forgotten
287+
lore. While I nodded, nearly napping, suddenly there came a tapping.
288+
</div>
289+
<div>
290+
As of some one gently rapping, rapping at my chamber door. “’Tis some visitor,” I muttered, “tapping at my chamber
291+
door— Only this and nothing more.”
292+
</div>
293+
```
294+
295+
</details>
296+
273297
[attribute value]: #attribute-value 'Definition of Attribute Value'
274298
[ancestor]: https://dom.spec.whatwg.org/#concept-tree-ancestor 'DOM ancestor, 2020/02/13'
275299
[bounding box]: https://www.w3.org/TR/css-ui-3/#valdef-box-sizing-border-box

0 commit comments

Comments
 (0)