Skip to content

Commit 40058d7

Browse files
giacomo-petriJym77
andauthored
"Text has minimum contrast" [afw4f7] and "Text has enhanced contrast" [09o5cg]: updated scenario for non-text content (#2155)
* Update text-contrast-afw4f7.md * Update text-contrast-enhanced-09o5cg.md * Update text-contrast-afw4f7.md * Update text-contrast-enhanced-09o5cg.md * Update text-contrast-enhanced-09o5cg.md * Update text-contrast-afw4f7.md * Update text-contrast-afw4f7.md * Update text-contrast-enhanced-09o5cg.md --------- Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>
1 parent 2dd3fc2 commit 40058d7

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

_rules/text-contrast-afw4f7.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,10 @@ This 14pt bold black text has a contrast ratio of 3.6:1 on the gray background.
139139

140140
#### Passed Example 7
141141

142-
This text does not convey anything in human language.
142+
The content of this button ("X") does not convey anything in human language; therefore, it passes the rule regardless of its contrast ratio. However, [Success Criterion 1.4.11 Non-Text Content][sc1411] should be examined for this non-text element.
143143

144144
```html
145-
<p style="color: #000; background: #666;">
146-
----=====++++++++___________***********%%%%%%%%%%%±±±±@@@@@@@@
147-
</p>
145+
<button style="color: #666; background-color: #000" aria-label="Close">X</button>
148146
```
149147

150148
#### Passed Example 8
@@ -436,3 +434,4 @@ This text is part of a [disabled][] widget because it is a child of an element w
436434
[user origin]: https://www.w3.org/TR/css3-cascade/#cascade-origin-user 'CSS 3, user origin'
437435
[visible]: #visible 'Definition of Visible'
438436
[html element]: #namespaced-element
437+
[sc1411]: https://www.w3.org/TR/WCAG22/#non-text-contrast

_rules/text-contrast-enhanced-09o5cg.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,10 @@ This 14pt bold black text has a contrast ratio of 4.6:1 on the gray background.
139139

140140
#### Passed Example 6
141141

142-
This text does not convey anything in human language.
142+
The content of this button ("X") does not convey anything in human language; therefore, it passes the rule regardless of its contrast ratio. However, [Success Criterion 1.4.11 Non-Text Content][sc1411] should be examined for this non-text element.
143143

144144
```html
145-
<p style="color: #000; background: #666;">
146-
----=====++++++++___________***********%%%%%%%%%%%±±±±@@@@@@@@
147-
</p>
145+
<button style="color: #666; background-color: #FFF" aria-label="Close">X</button>
148146
```
149147

150148
#### Passed Example 7
@@ -467,3 +465,4 @@ This text is part of a [disabled][] widget because it is a child of an element w
467465
[visible]: #visible 'Definition of Visible'
468466
[html element]: #namespaced-element
469467
[sc143]: https://www.w3.org/TR/WCAG22/#contrast-minimum
468+
[sc1411]: https://www.w3.org/TR/WCAG22/#non-text-contrast

0 commit comments

Comments
 (0)