Skip to content

[a11y]: Dark/Light theme toggle is not reachable via keyboard (focus skips the toggle entirely) #9958

@anish-devgit

Description

@anish-devgit

Describe the bug

On the TanStack Query documentation site, the dark/light theme toggle cannot be reached using keyboard navigation.

When navigating with the Tab or Shift+Tab keys, focus moves through several header icons but completely skips the theme toggle. This makes the toggle inaccessible for keyboard-only users and violates WCAG 2.4.3 (Focus Order).

Your minimal, reproducible example

This issue occurs directly on the official documentation page: https://tanstack.com/query/latest/docs/framework/react/overview No sandbox reproduction is required, as this is an accessibility issue on the live docs UI.

Steps to reproduce

  1. Go to: https://tanstack.com/query/latest/docs/framework/react/overview
  2. Press Tab to start navigating the header
  3. Focus moves through:
    • Menu icon
    • Logo
    • Search input
    • X icon
    • BlueSky icon
    • Instagram icon
    • Discord icon
  4. Focus then jumps directly to the “Log In” button
  5. The dark/light theme toggle is skipped entirely
  6. Press Shift+Tab — the toggle is still not reachable

Expected behavior

The dark/light theme toggle should be reachable via keyboard (Tab and Shift+Tab) in logical navigation order and should display a visible focus outline.

How often does this bug happen?

Every time

Screenshots or Videos

Image

Platform

OS: Windows 11
Browser: Chrome (latest)

Tanstack Query adapter

None

TanStack Query version

v5 (Docs website)

TypeScript version

Not applicable

Additional context

Happy to assist with further debugging or testing if needed.
Open to submitting a PR once the preferred implementation approach is confirmed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions