Links must be distinguishable without relying on color
How to fix the link-in-text-block accessibility rule. Colour and contrast.
What this rule checks
Ensure links are distinguished from surrounding text in a way that does not rely on color
Who is affected
This link is only distinguishable from surrounding text by colour. Colour-blind users can't see that it's a link.
How to fix it
Underline links inside paragraphs (or give them another non-colour cue).
Example
Before
p a { text-decoration: none; }After
p a { text-decoration: underline; }WCAG success criteria
When this rule fails, the page fails:
- 1.4.1 Use of Color (Level A, WCAG 2.0, 2.1, 2.2)
Find it on your own page
Scan a web page and the report lists every element that fails this rule, with screenshots outlining where they are, the code, and a selector you can paste into your browser’s developer tools.
More detail
- Deque University’s reference for link-in-text-block (the makers of axe-core, the engine our scanner uses)
- All fix guides