Lesson 9 of 9
Link Accessibility Best Practices
Making links accessible ensures that all users can successfully navigate your website. Following WCAG guidelines for links is both ethically important and often legally required.
Accessible Links Checklist
- 1Descriptive link text (no 'Click here')
- 2Visual distinction (underlines, not just color)
- 3Keyboard navigation (Tab + Enter)
- 4Focus indicators (never remove outline)
- 5Skip navigation link
- 6ARIA for icon-only links
- 7External link indication
Diagram
Loading diagramβ¦
Write descriptive link text that makes sense out of context
Accessible Links Example
Accessible Links Example
<!DOCTYPE html>
<html>
<head>
<style>
.skip-link { position:absolute; top:-40px; left:0; background:#229c6b; color:white; padding:10px; z-index:100; }
.skip-link:focus { top:0; }
a:focus { outline:3px solid #229c6b; outline-offset:2px; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
</style>
</head>
<body>
<a href="#main" class="skip-link">Skip to main content</a>
<nav>
<a href="/">Home</a> |
<a href="/about">About</a> |
<a href="/contact">Contact</a>
</nav>
<main id="main">
<h1>Accessible Links</h1>
<p><a href="/privacy">Read our privacy policy</a></p>
<p><a href="https://google.com" target="_blank" rel="noopener noreferrer">
Visit Google <span class="sr-only">(opens in new tab)</span>
</a></p>
<p><a href="/" aria-label="Go to homepage" style="font-size:24px">π </a></p>
</main>
</body>
</html>Quick Quiz
Module 3 β Knowledge Check
Module 3 β Knowledge Check
Question 1 of 5Which attribute specifies where a hyperlink navigates to?
Finished this lesson?
0 of 9 in Module 3