Skip to main content

"Links must be distinguishable without relying on color": how to make links stand out

Published · Updated

“Links must be distinguishable without relying on color” is the error you’ll see in axe. Lighthouse calls it “Links rely on color to be distinguishable”, and the Tabwise scan calls it “Links only distinguishable by colour”. They all mean the same thing: a link inside a paragraph only stands out because it’s a different colour.

If you can’t see that colour difference, the link looks like ordinary text. You won’t know it’s there to click.

It’s most common on financial services websites. In our study of Irish financial services websites, one in ten (10.1% of 714) had this problem. Across all the Irish business websites in our studies, it was 7.5% of 12,397. Our guide to financial services websites covers what else we found on them.

Who this affects

Colour blindness affects about 1 in 12 men and 1 in 200 women, according to Colour Blind Awareness. For many of them, a coloured link looks much like the text around it.

It also affects people with low vision, and older customers whose eyes need more contrast. And it affects everyone on a phone in bright sunlight, when subtle colours wash out.

What the check looks for

The check only looks at links inside a block of text, like a paragraph. Menus, buttons and links on their own line aren’t part of it.

A link passes if it has some other style that the text around it doesn’t have. The usual one is an underline. A border under the link, a background, bold, italics, a different font or a different text size also count.

If the link has none of those, it can still pass if its colour is different enough from the text around it. The difference has to be at least 3 to 1. That’s a contrast ratio, the same kind of measurement our guide to fixing colour contrast explains.

There’s a catch with the colour-only route. WCAG’s own advice also asks for a second change when you hover over the link or tab to it. Gaining an underline is one example. Our scan can’t test that. So the simplest answer is to underline links in your text and stop worrying about the maths.

How to fix it

Underline links in your body text. That’s the fix that always passes, and it’s what most people expect a link to look like.

You don’t need to underline links in your menu or footer, or buttons. This is about links in the middle of a sentence or paragraph.

WordPress and WooCommerce

If your theme is a newer block theme, go to Appearance, then Editor, and open Styles. Under Typography, choose Links. You can set the text decoration to underline there for the whole site. WordPress explains this in its Styles overview.

Older themes keep these settings in different places, usually under Appearance, then Customize. If you can’t find a link setting, ask your theme’s developer. Then run our free scan again to check.

Wix

Wix underlines text links by default, but the underline can be turned off. Select the linked text and click the underline button to put it back. Wix’s guide to formatting your text has the details.

Squarespace

Whether links are underlined depends on your template and site version. Squarespace’s guide to creating text links explains the options for each one.

Shopify

Link styles come from your theme. Look in your theme settings for a typography or link option. If there isn’t one, contact your theme’s developer. Then run our free scan again to check.

If someone else built your site

Copy this and send it to your web person:

Some links in our body text can only be told apart by colour, which fails WCAG 2.1 AA (success criterion 1.4.1). Please underline links inside paragraphs and other blocks of text across the site, including on hover and focus. Can you let me know when it’s done?

How to check it’s fixed

Run our free scan again. It lists any links in your text that still rely on colour alone. It checks your homepage and up to four pages linked from it, so look at your other pages too, especially longer pages of text.

A quick test by hand: look at a paragraph with a link in it, and imagine it in black and white. Could you still spot the link? You can also take a screenshot and turn it to greyscale on your phone.

Chrome has a free checker built in, called Lighthouse. Run its accessibility check on any page and look for “Links rely on color to be distinguishable”.

For your web developer

axe reports this as link-in-text-block, against WCAG 2.1 success criterion 1.4.1, Use of Color. It only tests links inside a block of text, in their default state.

In axe 4.13, a link passes if either is true:

  • Its style differs from the surrounding text in a way other than colour: text-decoration, a top or bottom border or outline, a background-image, or a different font family, weight, style or size.
  • Its text colour has at least 3:1 contrast with the surrounding text, or its background has at least 3:1 contrast with the surrounding background. If you rely on this, technique G183 also needs a non-colour change on hover and focus, which axe can’t check.

The simple fix:

main p a,
main li a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
  • Scope it to body text, so navigation and buttons keep their own styles.
  • Don’t remove the underline on hover. If anything, thicken it.
  • Page builders often set text-decoration: none on all links. Check that your rule isn’t overridden.

Check your own website for free

We'll scan your homepage and a few key pages and email you a plain-English report in minutes.

Free Report by email in minutes Privacy