Neova高级 SEO 平台

跳过链接的目标不存在

在 Neova 中 直接在抓取过程中运行,无需任何设置。

规则最近审核:2026年10月17日 · 指南更新:2026年7月22日

无障碍最佳实践,不是 WCAG 的要求。目标缺失的跳过链接不起任何作用,键盘用户无法跳过重复的区块。

您可以做什么

在主要内容的开头添加目标 id,或更正跳过链接的 href。

Neova 为何标记

  • 跳转链接让键盘用户跳过重复的菜单;如果目标不存在,它就毫无作用。
  • 键盘用户于是在每个页面上都得按 Tab 走遍所有菜单项。
  • WCAG 2.4.1(A 级)要求提供跳过重复区块的方式,跳转链接是常用做法。

来源

完整指南

这一部分目前只有英文版。

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.

在您自己的网站上找到它

Neova 在每次抓取时都会运行此检查项和其他所有检查项,然后把修复方法写成工单交给您的团队。

  • 适用于 Mac、Windows 和 Linux 的桌面应用
  • 全部 696 项检查,每项都附来源
  • Search Console 和 Analytics 4,以只读方式连接
  • 工单发送到 Jira、Linear 和 Asana

下载 Neova Desktop Free 套餐,或免费试用 Solo 14 天,无需银行卡。

全部无障碍检查 · 指南 · 检查项库

作者:Neova Labs · 返回检查项库