Lighthouse audit link-in-text-block · Accessibility

"Links rely on color to be distinguishable": how to fix it

Quick answer: Lighthouse flags "Links rely on color to be distinguishable" when a link inside a block of text has no underline or other non-color styling and its color has less than 3:1 contrast with the surrounding text. Fix it by underlining links in body text with text-decoration: underline, or give them a bottom border.
View raw .md for LLMs / your notes

Lighthouse prints Links rely on color to be distinguishable when a link inside a sentence or paragraph looks like the text around it except for its color, and that color is too close to the text color to notice. A reader with low vision or color blindness, or anyone on a washed-out screen, cannot tell where the link is. The audit comes from the axe-core rule link-in-text-block and maps to WCAG 2 success criterion 1.4.1, Use of Color (Level A). It carries a weight of 7 in the Accessibility score, the same as color contrast. This page covers what the rule measures, why removing underlines triggers it, and the one-line CSS fix.

TL;DR

The rule checks every <a href> and [role="link"] element that has visible text and sits inline inside a block of other text, such as a link in the middle of a paragraph or list item. A link that stands alone, such as a navigation item, a button-style link or a card title, is not checked.

For each of those links, axe-core asks two questions. The link passes if the answer to either one is yes.

CheckPasses when
Is it styled differently from the text around it?The link has an underline or other text-decoration the surrounding text does not have, a visible bottom border, top border or outline, a background image, or a different font weight, font style, font size or font family
Is the color difference strong enough?The link color has at least 3:1 contrast with the color of the surrounding text, or the link background has at least 3:1 contrast with the surrounding background

When both answers are no, the audit lists the link with a line like this:

The link has insufficient color contrast of 2.27:1 with the surrounding text.
(Minimum contrast is 3:1, link text: #0066cc, surrounding text: #333333)

The contrast here is between the link and the text next to it, not between the link and the page background. That second ratio is the job of the color-contrast audit, which wants 4.5:1 for normal text.

Why does my site fail it?

Almost always because a stylesheet removed the underline from links and nothing replaced it:

Some common pairs and how they measure:

Link colorText colorContrastResult without an underline
#0000ee (browser default blue)#0000002.23:1Fails
#0066cc#3333332.27:1Fails
#0b57d0#1a1a1a2.73:1Fails
#2563eb#1118273.43:1Passes
#d93025#0000004.40:1Passes

A hover underline does not help. Lighthouse tests the page as loaded, with no pointer over anything, and touch screens have no hover at all.

Scope the rule to the containers that hold running text, so navigation and buttons keep their look:

main p a,
main li a,
article a,
.prose a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: from-font;
}

text-underline-offset and text-decoration-thickness let you tune the line so it does not cut through descenders. Any underline passes, including a dotted or wavy one, because the rule compares text-decoration-line and text-decoration-style with the surrounding text.

2. Use another non-color cue

If the design rules out underlines, any of these also pass:

/* A bottom border instead of an underline */
.prose a { text-decoration: none; border-bottom: 1px solid currentColor; }

/* A heavier weight than the paragraph text */
.prose a { font-weight: 700; }

A bottom border is the safest substitute, because readers already read it as a link. Bold alone passes the audit, but bold text is also used for emphasis, so it is a weaker signal.

3. Or reach 3:1 against the surrounding text

You can keep color as the only cue if the link color has 3:1 contrast with the text color. In practice this is hard, because the link also needs 4.5:1 against the background to pass the color-contrast audit, and the two requirements pull in opposite directions:

WCAG's own technique for color-only links (G183) also asks for a second cue, such as an underline, when the link is hovered or focused. If you take this route, add one.

For most sites the underline is less work and helps more people.

How do I fix it in WordPress, Shopify, Tailwind, or Bootstrap?

Yes, and that is a gap worth knowing. If a link has the same color and the same styling as the text around it, the rule passes it: the link does not rely on color, because nothing sets it apart at all. A fully reset link, such as an unstyled link under Tailwind's Preflight, is invisible to readers and still green in Lighthouse. Passing this audit does not prove your links are findable. Look at the page.

The rule also cannot judge some cases and reports them for manual review instead of failing them: links over a background image or gradient, and links that draw their underline with a ::before or ::after pseudo-element. Lighthouse does not count those as failures.

How do I verify the fix?

  1. Re-run Lighthouse. "Links rely on color to be distinguishable" should move to the passed audits.
  2. Run the axe DevTools browser extension on a page with long body text. It reports the same rule with the measured ratio for each link.
  3. Check with your eyes: view the page in grayscale (DevTools, Rendering panel, Emulate vision deficiencies, Achromatopsia). Every link in body text should still be obvious.
  4. Check templates the first run did not cover: blog posts, product descriptions, policy pages and the footer.

What mistakes should I avoid?


Audit your URL at https://lighthouse-md.com.

Audit your page now

Paste your URL, get scores plus a CLAUDE.md plan for Claude Code.

Run audit →
Add us as a preferred source on Google

One click, and Google shows more of lighthouse-md.com in your search results.