Skip to content

issue: [a11y] Header navigation has incorrect keyboard focus order (icons are focused before main nav items)Β #1182

@anish-devgit

Description

@anish-devgit

Version Number

Docs website (v7 documentation, latest live version)

Codesandbox/Expo snack

Not applicable β€” issue is related to the documentation website UI (header focus order), not the library API. A reproduction Codesandbox is not relevant because the bug is only present on the live docs site.

Steps to reproduce

  1. Go to https://react-hook-form.com/get-started

  2. Press Tab from the top of the page

  3. Observe the focus order in the header

  4. The actual sequence becomes

    Search β†’ Dark Mode Toggle β†’ Discord Icon β†’ X Icon β†’ GitHub Icon β†’ Home β†’ Get Started β†’ API β†’ TS β†’ Advanced β†’ ...

  5. This order does not match the visual layout of the navigation.

Image

Expected behaviour

The keyboard focus order should follow the visual, logical navigation order:

Search β†’ Dark Mode Toggle β†’ Home β†’ Get Started β†’ API β†’ TS β†’ Advanced β†’ FAQs β†’ Tools β†’ Resources β†’ Releases β†’ Discord β†’ X β†’ GitHub

This aligns with WCAG 2.4.3 (Focus Order), ensuring keyboard users access the main navigation before social/action icons.

What browsers are you seeing the problem on?

Chrome

Relevant log output

No console errors β€” issue relates to incorrect keyboard focus order in the header.

Code of Conduct

  • I agree to follow this project's Code of Conduct

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