On this page
Inline links should be recognizable before a reader hovers over them. If a link differs from surrounding text only by color, some readers may miss it. This guide shows how to make links easier to find, check their contrast, and review representative pages before an accessibility audit.
Key Takeaways
- Underline inline links in their resting state; do not rely on color or hover alone to identify them.
- Check link text contrast against its background, and make keyboard focus visible.
- Use descriptive link text so readers can understand where a link leads.
- Test representative pages with keyboard navigation and color-vision simulation, then review findings against the applicable accessibility criteria.
Make the link visible in context
An underline is a familiar visual cue that remains visible when color differences are hard to perceive. Keep it present in paragraphs, lists, and other places where links appear among ordinary text. Choose an underline thickness and offset that are easy to see without obscuring letter shapes.
The surrounding text matters too. If ordinary text is also underlined for emphasis, readers may have trouble distinguishing it from a link. Use another treatment, such as bold text, for non-link emphasis and reserve underlining for links where practical.
Standards note: WCAG 2.2 Success Criterion 1.4.1 addresses the use of color. Its exact requirements and the W3C Understanding document could not be consulted for this article, so use those sources when assessing conformance rather than treating this guide as an audit checklist. Contrast and keyboard focus are also covered by other accessibility requirements.
Advertisement
Example: an underlined inline link
This illustrative example uses an underline from the outset, then strengthens it on hover and adds an outline on keyboard focus. The link points to a section on the same page; replace its label and destination with content appropriate to your page.
<main class="article-copy">
<p>
Read our <a href="#returns">returns policy</a> before sending an item back.
</p>
<h2 id="returns">Returns policy</h2>
<p>Contact the support team for help with a return.</p>
</main>
.article-copy {
color: #222;
background: #fff;
}
.article-copy a[href] {
color: #0000a0;
text-decoration: underline;
text-decoration-thickness: 2px;
text-underline-offset: 0.15em;
}
.article-copy a[href]:hover {
text-decoration-thickness: 3px;
}
.article-copy a[href]:focus {
outline: 3px solid #000;
outline-offset: 3px;
}
The underline identifies the link before interaction. The hover treatment supplies additional feedback for pointer users; it does not replace the resting underline. The focus outline helps a keyboard user locate the currently focused link. The :focus selector can also show the outline after a mouse click, which is a reasonable trade-off for this simple example.
These snippets have not been executed here. Check the result in your site's supported browsers and with your actual fonts, backgrounds, and layouts. In particular, make sure the focus outline is not clipped or hidden by nearby content.
Check contrast and interaction states
The underline and contrast solve different problems: the underline indicates that text is a link, while sufficient contrast helps readers perceive the text itself. Check the link color against its actual background, not just against the surrounding text color. For normal-sized text, 4.5:1 is the usual WCAG minimum contrast target, subject to the criterion's exceptions. Check ordinary body text as well.
Review each relevant state:
- Resting: The link is recognizable without moving a pointer over it.
- Hover: The link responds to a pointer, while its original cue remains present.
- Keyboard focus: The focused link has a visible indicator that stands out against adjacent colors.
- Visited: If your site styles visited links differently, the color still has sufficient contrast and the link remains identifiable.
A link's exact shade or underline offset can be a design preference. A visible non-color cue, readable contrast, and usable keyboard focus address accessibility needs; do not discard them merely because a minimal visual treatment looks cleaner.
Advertisement
Review representative pages before the audit
- Choose varied examples. Include article paragraphs, product descriptions, lists, and any components with different backgrounds or link styles. Check links that wrap across lines as well as short links.
- Inspect without interaction. Can you pick out each inline link before hovering? Check for underlined non-links that might be mistaken for links.
- Measure contrast. Use a contrast checker on the actual foreground and background colors for body text and each link state. Recheck links placed on tinted panels or images; a contrast result for a white background does not establish contrast elsewhere.
- Use color-vision simulation. View representative pages with a simulator and look for links that become difficult to distinguish. Simulation is a helpful review aid, not proof that every reader can use the page or that it meets WCAG.
- Navigate by keyboard. Reload the page, use Tab to move through links and Shift+Tab to move backward, and check that focus is visible and moves in a sensible order. Activate a link with Enter. Check the focus indicator at different zoom levels and near component edges.
- Review the words. Prefer labels such as “returns policy” over repeated “click here” links. A reader should be able to understand the destination from the link text or its context.
Record the page, component, state, and issue for each finding. Fix shared styles where possible, then recheck the affected pages.
Common Mistakes
- Adding an underline only on hover. Readers using touch or keyboard navigation may never encounter that cue before deciding whether the text is a link.
- Checking only link color against body-text color. The link must also be readable against its background.
- Removing focus outlines without an adequate replacement. A keyboard user needs to see where focus is.
- Assuming a simulator is an audit. Simulation does not cover every visual or interaction need, and it does not establish conformance.
- Using the same vague label for different destinations. Distinct, descriptive labels make links easier to understand and review.
Best Practices
Define a shared inline-link style for your content system, including resting, hover, focus, and visited states. Review exceptions—such as links on dark panels—separately instead of assuming the default style works everywhere. Involve people with different access needs in usability reviews when possible, and use an accessibility audit to assess the full set of applicable requirements.
Conclusion
Start with an always-visible underline, readable contrast, and a clear keyboard focus indicator. Then review real pages in context: a link style is only useful if readers can find and use it where it appears.
What would your domain sell for?
A free TidyURLs account unlocks the Domain Estimator. It prices a name from 191,011 real domain sales.