Skip to content

a11y: Fix empty focusable link in reference Jump To nav - #1600

Open
coseeian wants to merge 1 commit into
processing:mainfrom
coseeian:a11y-empty-nav-link
Open

coseeian wants to merge 1 commit into
processing:mainfrom
coseeian:a11y-empty-nav-link

Conversation

@coseeian

@coseeian coseeian commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

This PR removes an empty, invisible, but keyboard-focusable link from the reference sidebar reported by a11y page tests. This fixes a WCAG 2.0 Level A failure.

The Problem

Some reference entries carry empty submodule information. As a result, the jump to submodule link in ReferenceItemLayout was generating empty anchors:

<li class="_linklabel_1jot8_995"><a href="/reference/#"></a></li>

Because an anchor without text collapses to 0x0 in size, it is visually invisible and unclickable. However, it remains in the DOM tab order. Keyboard and screen reader users tabbing through the sidebar encounter a ghost focus stop that announces as "link" only.

The Fix

  • Conditional rendering: The jump-to-submodule link is now only rendered when a valid submodule exists.
  • Safeguard in JumpToLinks: Added a check so JumpToLinks skips any label-less links, preventing empty anchors from returning via another collection's Jump To state.

@coseeian coseeian added Accessibility: High Severity Web accessibility issues that have a significant negative impact on users Accessibility: Low Severity Minor impact or no clear violation of a11y guidelines, but still a negative experience and removed Accessibility: Low Severity Minor impact or no clear violation of a11y guidelines, but still a negative experience labels Sep 14, 2026
@coseeian
coseeian marked this pull request as ready for review September 14, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accessibility: High Severity Web accessibility issues that have a significant negative impact on users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant