83.9% of homepages fail WCAG contrast checks in 2026, up from 79.1% the year before. The HTTP Archive and WebAIM Million have been tracking this for years. The numbers barely move. Half a decade of accessibility linters, design system tooling, and JavaScript color libraries has produced roughly nothing at scale. The conclusion the data forces: runtime JS is the wrong layer for this problem.

CSS Color Level 5 ships the fix as a single function: contrast-color(). Pass it a color, get back black or white, whichever clears the contrast bar. The browser runs the math at style computation time, before paint. No library, no build step, no hydration flash. Chrome 147, Firefox 146, and Safari 26.0 all ship it. It hit Baseline Newly Available in April 2026. The old color-contrast() name from 2021-2023 drafts is dead and will silently break your declaration if you use it.

The article is worth reading in full for two reasons. First, the spec split between Level 5 and Level 6 is unusual and consequential: Level 5 deliberately marks its contrast algorithm as UA-defined, which is an engineered escape hatch in case APCA, the leading WCAG 2.x replacement, does not survive the standards process. APCA was pulled from the WCAG 3 working draft in mid-2023 and the standard itself may not finalize until 2030. Second, Level 6 extends the function with candidate color lists and target ratios, syntax that only makes sense if you understand why Level 5 shipped without it. The roadmap is messier than the launch announcement suggests.

[READ ORIGINAL →]