Free scan

Fix "Link indistinguishable from nearby text" in HTML

Why it's a problem

A link marked by colour alone disappears for colour-blind users or under low contrast: nothing signals that it is a link. RGAA requires a distinction that does not rely on colour alone.

How to fix it — HTML

Underline the link, or give it another permanent visual cue (weight, border). If you insist on removing the underline, the contrast between link and text colour must reach 3:1, AND an extra distinction must appear on hover and focus.

Avoid
<p>Consultez <a href="/tarifs" style="color:#2f6fd0;text-decoration:none">nos tarifs</a>.</p>
Correct
<p>Consultez <a href="/tarifs" class="lien">nos tarifs</a>.</p>

<style>
/* Le soulignement est le repère le plus sûr : il ne dépend d'aucune perception de couleur. */
.lien { text-decoration: underline; text-underline-offset: 2px; }
.lien:hover, .lien:focus-visible { text-decoration-thickness: 2px; }
</style>

RGAA criterion 10.6 — Présentation de l’information

Dans chaque page web, chaque lien dont la nature n’est pas évidente est-il visible par rapport au texte environnant ?

How to check: official tests (in French)

  1. Test 10.6.1

    Dans chaque page web, chaque lien texte signalé uniquement par la couleur, et dont la nature n’est pas évidente, vérifie-t-il ces conditions ?

    La couleur du lien a un rapport de contraste supérieur ou égal à 3:1 par rapport au texte environnant ;

    Le lien dispose d’une indication visuelle au survol autre qu’un changement de couleur ;

    Le lien dispose d’une indication visuelle au focus autre qu’un changement de couleur.

Full page for criterion 10.6 · Official text: Référentiel général d'amélioration de l'accessibilité (RGAA) 4.1, DINUM, Licence Ouverte 2.0.

Check your site in 30 seconds

Conformly detects this kind of issue across all your pages, continuously, and alerts you on every regression.

Free scan

Other fixes — Présentation de l’information