Same-page links must have a corresponding target
Description
The accessibility requirement that Links must have a corresponding target
ensures that every link on a webpage has a valid destination URL that users can navigate to. This fundamental principle affects multiple aspects of web accessibility and user experience.
Disabilities impacted
Visual impairments
- Screen reader users rely on links being properly structured to announce destinations correctly.
- Users with low vision need consistent link formatting to maintain orientation.
- Proper link targets help users with visual processing difficulties navigate effectively.
Cognitive disabilities
- Clear link targets reduce confusion and cognitive load.
- Users with learning disabilities benefit from predictable navigation patterns.
- Proper link structure helps users understand website organization and relationships.
Motor impairments
- Users who rely on keyboard navigation need reliable link targets for consistent movement.
- Those with limited dexterity benefit from properly structured links for easier selection.
- Clear link destinations help users with mobility impairments navigate efficiently.
Why it matters
This accessibility requirement matters because:
- It ensures reliable navigation across the entire website.
- Helps maintain user trust and confidence in the interface.
- Enables effective use of assistive technologies.
- Supports consistent user experience across different devices and platforms.
Coding problems and solutions
Common coding problems
<!-- Problematic examples -->
<a href="#">Broken Link</a>
<a onclick="void(0)">Non-functional Link</a>
<a style="cursor:pointer">Not a Link</a>How to fix it
<!-- Correct implementation -->
<a href="#heading">Go to heading</a>
<a href="/about-us">About Us Page</a>
<a href="mailto:support@example.com">Contact Support</a>
<a href="tel:+1234567890">Call Us</a>Known limitations
- Dynamic content challenges:
- Links generated by JavaScript may require additional handling.
- Content loaded asynchronously needs proper link management.
- Single-page applications must maintain valid targets during routing
- Technical constraints:
- Some legacy systems may have limitations in URL structure.
- Complex routing mechanisms can complicate target maintenance.
- Third-party integrations might require special handling.
Resources
Rule
- Audit: Accessibility
- Standard: WCAG
- Level: A
- Success Criteria: 2.4.4
- ID:
broken-same-page-link