The Colour Contrast Analyser (CCA) helps you determine the legibility of text and the contrast of visual elements, such as graphical controls and visual indicators.
When the CCA window says "Contrast ratio just below 4.5:1", copying the results to the clipboard says "Contrast ratio: 4.5:1".
The difference between "just below 4.5:1" and "4.5:1" is the difference between failing and passing, so this is a significant difference. Furthermore, the clipboard text contradicts itself by saying "Contrast ratio: 4.5:1" followed by "Fail for regular text".
Example of clipboard text:
Foreground: #777777
Background: #FFFFFF
Contrast ratio: 4.5:1
1.4.3 Contrast (Minimum) (AA)
Pass for large text only. Fail for regular text
1.4.6 Contrast (Enhanced) (AAA)
Fail for large and regular text
1.4.11 Non-text Contrast (AA)
Pass for UI components and graphical objects
A similar problem occurs for a contrast ratio "just below 3:1 (2.995:1)". Example of clipboard text:
Foreground: #959595
Background: #FFFFFF
Contrast ratio: 3:1
1.4.3 Contrast (Minimum) (AA)
Fail for large and regular text
1.4.6 Contrast (Enhanced) (AAA)
Fail for large and regular text
1.4.11 Non-text Contrast (AA)
Fail for UI components and graphical objects
Desktop (please complete the following information):
OS: Windows 10 64 bit
CCA Version: 3.3.0
To Reproduce
Using the eyedropper or direct entry, enter a pair of colors which differ by just under 4.5:1. Example: #777777 and #FFFFFF
In the CCA window, observe the contrast ratio reported. Example: "Contrast ratio just below 4.5:1 (4.478:1)"
In the "Edit" menu, select "Copy results" (or press CTRL + SHIFT + C) to copy results to the clipboard.
Paste the results outside of CCA.
In the pasted results, observe the contrast ratio reported.
Expected behavior
The contrast ratio reported at step 2 should be the same as the contrast ratio reported at step 5.
How to format it in the clipboard:
"Contrast ratio: 4.478:1" is a good format for the clipboard. Use case: As a WCAG evaluator pasting this information manually into an audit report, I prefer to see just the number. Use case: As an engineer using a script to process the result, I can parse the single number easily.
"Contrast ratio: just below 4.5:1 (4.478:1)" would be an acceptable alternative for the clipboard.
Note: When the CCA window shows a result rounded to one decimal place (e.g., "Contrast ratio 4.4:1"), the same rounded result should continue to appear in the clipboard ("Contrast ratio: 4.4:1") as it does today.
When comparing the computed contrast ratio to the Success Criterion ratio, the computed values should not be rounded (e.g. 4.499:1 would not meet the 4.5:1 threshold).
Describe the bug
When the CCA window says "Contrast ratio just below 4.5:1", copying the results to the clipboard says "Contrast ratio: 4.5:1".
The difference between "just below 4.5:1" and "4.5:1" is the difference between failing and passing, so this is a significant difference. Furthermore, the clipboard text contradicts itself by saying "Contrast ratio: 4.5:1" followed by "Fail for regular text".
Example of clipboard text:
A similar problem occurs for a contrast ratio "just below 3:1 (2.995:1)". Example of clipboard text:
Desktop (please complete the following information):
To Reproduce
Expected behavior
The contrast ratio reported at step 2 should be the same as the contrast ratio reported at step 5.
How to format it in the clipboard:
Note: When the CCA window shows a result rounded to one decimal place (e.g., "Contrast ratio 4.4:1"), the same rounded result should continue to appear in the clipboard ("Contrast ratio: 4.4:1") as it does today.
Screenshots
Step 2 in steps to reproduce:
Additional context
Understanding SC 1.4.3 Contrast (Minimum):