Accessibility Wiki

A same-page link must point at a real target

Rule skip-link-target-valid · Component patterns (best practice) · impact serious · Static + live

↩ Back to the rules index · WCAG cross-reference

Why it matters

Skip links and in-page anchors move the reader to the element referenced by the URL fragment. If that fragment matches no id (or legacy anchor) in the document, the link does nothing — a skip link that goes nowhere defeats its bypass purpose. (Focusability of the target is NOT required: browsers move the sequential-focus starting point to the fragment target, so Tab continues from there.)

How to fix

Point the link at an element that exists — give the destination a matching id (e.g.

). The spec-defined fragments "#" and "#top" scroll to the top of the page and need no element.

Example

✕ Fails
<a href="#main">Skip to content</a><div>Body</div>
✓ Passes
<a href="#main">Skip to content</a><main id="main">Body</main>

WCAG success criteria

2.4.1 Bypass Blocks — Level A

Provide a way (skip link, landmarks, headings) to bypass repeated blocks like navigation.

Understanding 2.4.1

Standards

This rule contributes to the following standards:

WCAG A EN 301 549

Standard Criteria
EN 301 549 9.2.4.1

References