Skip to content

Commit

Permalink
"Text has minimum contrast" [afw4f7] and "Text has enhanced contrast"…
Browse files Browse the repository at this point in the history
… [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 <[email protected]>
  • Loading branch information
giacomo-petri and Jym77 authored Mar 1, 2024
1 parent 2dd3fc2 commit 40058d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions _rules/text-contrast-afw4f7.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,10 @@ This 14pt bold black text has a contrast ratio of 3.6:1 on the gray background.

#### Passed Example 7

This text does not convey anything in human language.
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.

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

#### Passed Example 8
Expand Down Expand Up @@ -436,3 +434,4 @@ This text is part of a [disabled][] widget because it is a child of an element w
[user origin]: https://www.w3.org/TR/css3-cascade/#cascade-origin-user 'CSS 3, user origin'
[visible]: #visible 'Definition of Visible'
[html element]: #namespaced-element
[sc1411]: https://www.w3.org/TR/WCAG22/#non-text-contrast
7 changes: 3 additions & 4 deletions _rules/text-contrast-enhanced-09o5cg.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,10 @@ This 14pt bold black text has a contrast ratio of 4.6:1 on the gray background.

#### Passed Example 6

This text does not convey anything in human language.
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.

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

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

0 comments on commit 40058d7

Please sign in to comment.