Journal · 22 July 2025

Colour contrast for inline field errors

Colour swatches laid out on a desk

Form validation messages must meet at least 4.5:1 contrast against their background for normal text. Brand “alert red” tints designed for large marketing banners often land near 3:1 on white—fine for decoration, not for sentences.

Pair colour with text and icon

WCAG 1.4.1 Use of Colour still applies: do not rely on red alone. We recommend a short prefix such as “Error:” and an icon with aria-hidden="true" when designers insist on subtle hues.

Dark backgrounds

Glass-style panels on tinted backgrounds change the effective contrast. Measure against the pixel behind the text, not the page default. We screenshot the error state at 1× and run the sample in a contrast checker.

Public-sector palettes

Many ZA government sites use deep blue headers with white content wells. Error text that works in the well may fail if validation appears inside a blue alert strip—test both placements.

See what our audit report includes