NeovaNền tảng SEO chuyên sâu

Đích của skip link không tồn tại

Trong Neova Chạy ngay từ lần crawl: không cần thiết lập gì.

Quy tắc được rà soát lần cuối ngày 17 tháng 10 năm 2026 · Hướng dẫn cập nhật ngày 22 tháng 7 năm 2026

Thực hành tốt về khả năng tiếp cận, không phải yêu cầu của WCAG. Một skip link có đích bị thiếu sẽ không làm gì cả, nên người dùng bàn phím không thể vượt qua các khối lặp lại.

Bạn có thể làm gì

Thêm id đích vào đầu nội dung chính, hoặc sửa href của skip link.

Vì sao Neova đánh dấu

  • Skip link giúp người dùng bàn phím bỏ qua các menu lặp lại; nếu đích của nó không tồn tại, nó không làm gì cả.
  • Khi đó người dùng bàn phím phải Tab qua mọi mục menu trên mọi trang.
  • WCAG 2.4.1 (cấp độ A) yêu cầu có cách bỏ qua các khối lặp lại, và skip link là kỹ thuật phổ biến.

Nguồn

Hướng dẫn đầy đủ

Phần này tạm thời còn bằng tiếng Anh.

AI Summary

A skip link only works when its fragment href points to an element that exists and can take focus, so href="#main" needs a matching id="main" with tabindex="-1" on a non interactive target. If the target is missing or not focusable, activating the link leaves keyboard focus stranded and the check fails.

  • The link, the target id, and focusability must all line up
  • Non interactive targets need tabindex="-1" to receive focus
  • Hide the link with a visually hidden pattern, not display:none
  • Test by tabbing to the link, pressing Enter, and tabbing again
Diagram of a working skip link chain where the anchor href points to a matching id on a main element with tabindex minus one so keyboard focus lands on activation.
A skip link works only when its fragment matches a real, focusable target element.

A skip link is a small piece of markup with an outsized impact for keyboard users. It lets someone jump past the header and navigation and land on the main content in a single keystroke. This check fails when the link points at a target that either does not exist or cannot take focus, which turns a helpful shortcut into a dead control.

The Three Parts That Must Line Up

A working skip link is a chain, and every link in the chain has to hold. First, the anchor carries a fragment href such as href="#main". Second, an element on the page has the matching id, for example id="main". Third, that target can receive focus. Containers like <main>, <section>, or a heading are not focusable by default, so they need tabindex="-1" to accept programmatic focus when the link is activated. Break any one of these and the browser may move the document position but leave keyboard focus stranded on the link.

A Working Example

The reference pattern is short. Put the link as the very first element inside the body, and give the main region a matching id and a negative tabindex:

<a class="skip-link" href="#main">Skip to content</a>
...
<main id="main" tabindex="-1">
  <h1>Page heading</h1>
</main>

Style the link so it is visually hidden until it receives focus, rather than removed with display:none, which would take it out of the tab order entirely. A common approach positions it off screen and brings it back into view on :focus.

Symptom Likely Cause Fix
Enter does nothing Target id missing Add id to the main content element
Focus returns to menu Target not focusable Add tabindex="-1" to the target
Link never appears on Tab Hidden with display:none Use a visually hidden pattern that reveals on focus
Jumps to wrong place id duplicated on the page Keep the id unique and on the content start
Works by mouse only href points to a name anchor Point href at a real id, add tabindex if needed

Why Targets Get Broken

Skip links rot quietly. A template refactor renames the wrapper id from main to content but the header partial still links to #main. A page builder outputs the main region without an id. A developer removes the tabindex="-1" during a cleanup because it looked unnecessary. None of these break the visual layout, so the regression ships unnoticed until a keyboard user or an audit finds it.

How to Verify

Testing takes seconds and needs no tools. Reload the page, press Tab once, and watch for a visible focus ring on the skip link. Activate it with Enter, then press Tab again and confirm focus has moved into the main content rather than back to the first navigation item. For a thorough pass, repeat with a screen reader and listen for the main landmark or heading being announced right after activation.

Quick Reference

Element Code: AC-041

Issue: Skip link points to non-existent target

Impact: Skip link fails

Fix: Fix target element

Detection: Manual testing

What Is This Issue?

Skip links must point to existing, focusable elements.

Why This Matters

Broken skip links fail keyboard users.

How to Fix

  1. Check target ID exists
  2. Add tabindex=-1 if needed

Tools

  • Manual testing: Test skip link

TL;DR

Make sure skip links point to existing elements that can receive focus.

Frequently Asked Questions

A skip link is usually the first focusable link on the page, often visually hidden until focused, that jumps past repeated navigation straight to the main content. Keyboard and switch users, and many screen reader users, rely on it so they do not tab through the same menu on every page.

The most common reason is that the target the link points to does not exist or cannot receive focus. If the href is "#main" but no element has id="main", or the target is a non focusable container without tabindex, the browser moves the document position but focus stays on the link, so the next tab returns to the menu.

Do I Need tabindex="-1" on the Target?

For non interactive containers like main, section, or a heading, yes. tabindex="-1" makes the element programmatically focusable so activating the skip link moves keyboard focus there. Naturally focusable targets such as a link or input do not need it. Never use a positive tabindex.

Point it at the start of the primary content, typically the main landmark or the first heading inside it. Using href="#main" with a matching id="main" on the main element is the cleanest pattern and doubles as a helpful landmark for assistive technology.

Load the page, press Tab once, and confirm a visible focus indicator appears on the skip link. Press Enter, then Tab again and confirm focus is now inside the main content rather than back in the navigation. Repeat with a screen reader to hear the target announced.

Not directly, but it is a WCAG failure that lowers your accessibility score and can surface in automated audits used in quality reviews. Fixing it improves usability for keyboard users and clears an issue that quality focused crawlers report, which supports overall site health.

Tìm lỗi này trên trang của bạn

Neova chạy mục kiểm tra này và mọi mục khác trong mỗi lần crawl, rồi viết cách sửa thành ticket cho nhóm của bạn.

  • Ứng dụng máy tính cho Mac, Windows và Linux
  • Tất cả 696 mục kiểm tra, mỗi mục kèm nguồn
  • Search Console và Analytics 4, kết nối chỉ đọc
  • Ticket sang Jira, Linear và Asana

Tải Neova Gói Desktop Free, hoặc dùng thử Solo miễn phí 14 ngày, không cần thẻ.

Tất cả mục kiểm tra Khả năng truy cập · Hướng dẫn · Thư viện mục kiểm tra

Do Neova Labs biên soạn · Quay lại Thư viện mục kiểm tra