WCAG AAA is the highest of three conformance levels in the Web Content Accessibility Guidelines, which the W3C publishes. WCAG stands for Web Content Accessibility Guidelines. For color, AAA means a contrast ratio of at least 7:1 for normal text and 4.5:1 for large text, set by success criterion 1.4.6 Contrast (Enhanced).
A page meets Level AAA when it satisfies every Level A, AA and AAA success criterion, or when a conforming AAA alternate version is provided. The W3C adds a caution to the conformance section: it is not recommended to require AAA as a general policy for entire sites, because some content cannot satisfy every AAA criterion. In practice teams apply AAA criteria selectively, for example to body text or to a high-contrast theme.
The contrast ratio uses the same formula as AA, (L1 + 0.05) / (L2 + 0.05) on relative luminance, with a maximum of 21:1. Only the thresholds move.
Large-scale text is at least 18 point or 14 point bold, the same as at AA. Because 4.5:1 is the AAA large-text bar, any text that passes AA at normal size is only halfway to AAA.
const lin = v => { v /= 255; return v <= 0.04045 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4; };
const lum = h => { const n = parseInt(h.slice(1), 16);
return 0.2126 * lin(n >> 16 & 255) + 0.7152 * lin(n >> 8 & 255) + 0.0722 * lin(n & 255); };
const ratio = (a, b) => { const [x, y] = [lum(a), lum(b)].sort((p, q) => q - p); return (x + 0.05) / (y + 0.05); };
for (const fg of ['#767676', '#1d4ed8', '#595959']) {
const r = ratio(fg, '#ffffff');
console.log(fg, 'on white', r.toFixed(2) + ':1', 'AA text', r >= 4.5 ? 'pass' : 'fail', 'AAA text', r >= 7 ? 'pass' : 'fail', 'AAA large', r >= 4.5 ? 'pass' : 'fail');
}
#767676 on white 4.54:1 AA text pass AAA text fail AAA large pass
#1d4ed8 on white 6.70:1 AA text pass AAA text fail AAA large pass
#595959 on white 7.00:1 AA text pass AAA text pass AAA large pass
The AAA contrast ratio is 7:1 for normal text and 4.5:1 for large text. #595959 on white computes to 7.0047:1, which makes it the lightest neutral gray that passes. As with AA, the W3C says computed values must not be rounded, so 6.999:1 fails.
Usually not. The W3C advises against requiring AAA site-wide, and most accessibility rules reference Level AA, so check the specific regulation you are bound by. Treat AAA contrast as an option for reading-heavy pages or users who need stronger contrast.