concept
use-of-color — CSS reference
Color alone must not be the only visual signal for information, actions or state. Pair status colors with meaningful visible labels, patterns or shapes as appropriate. For links distinguished only by color within prose, additional contrast and non-color cues are relevant; the straightforward option is a persistent underline. Semantic status text also helps when user palettes override author colors.
Formal Syntax & Structure
css syntaxcss
WCAG 2.2 SC 1.4.1; provide text or another visual cueWorking Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS accessible theme lab</title><style>body {margin:0} .sample {height:12px;background:#006050}a{color:#0645ad;text-decoration:underline} .error{color:#a00000;font-weight:bold}</style><body><p><a id="a" href="#details">Read details</a></p><p class="error" id="b">Error: enter an email address.</p><p id="details">Details</p></body></html>