๐จ Contrast Fails WCAG AA WCAG 1.4.3
Issue ID: contrast-aa-fail
Text with insufficient contrast is hard to read for people with low vision or color blindness. WCAG AA requires 4.5:1 for normal text and 3:1 for large text (18px bold / 24px regular).
โ Bad: ratio 2.1:1
.subtitle {
color: #aaaaaa; /* light grey */
background: #ffffff; /* white */
/* Contrast ratio: 2.1:1 - FAILS AA */
}โ
Good: ratio 4.6:1
.subtitle {
color: #767676; /* darker grey */
background: #ffffff; /* white */
/* Contrast ratio: 4.6:1 - PASSES AA */
}๐จ Contrast Fails WCAG AAA WCAG 1.4.6
Issue ID: contrast-aaa-fail
WCAG AAA requires enhanced contrast: 7:1 for normal text and 4.5:1 for large text. This is the highest standard and ideal for critical content.
โ Bad: ratio 4.6:1 (passes AA, fails AAA)
.text {
color: #767676;
background: #ffffff;
/* Ratio 4.6:1 - fails AAA for normal text */
}โ
Good: ratio 8.6:1
.text {
color: #404040;
background: #ffffff;
/* Ratio 8.6:1 - passes AAA */
}๐จ Non-Text Contrast Failure WCAG 1.4.11
Issue ID: contrast-nontext-fail
UI components (buttons, inputs, icons) and graphical objects need at least 3:1 contrast against adjacent colors. A light grey border on a white input, for example, can be invisible to low-vision users.
โ Bad
input {
border: 1px solid #e0e0e0; /* barely visible */
background: #ffffff;
}โ
Good
input {
border: 2px solid #767676; /* 4.5:1 ratio */
background: #ffffff;
}๐ WAVE: Contrast Error WCAG 1.4.3
Issue ID: contrast_fail (WAVE)
The WAVE scanner detected text that does not meet WCAG AA contrast requirements. Use a contrast checking tool to find a color pair that achieves at least 4.5:1 for normal text or 3:1 for large text. See the fixes above for contrast-aa-fail.