Skip to content

♿️(frontend) focus docs list content after filter navigation#1864

Open
Ovgodd wants to merge 1 commit intomainfrom
fix/navigation-focus
Open

♿️(frontend) focus docs list content after filter navigation#1864
Ovgodd wants to merge 1 commit intomainfrom
fix/navigation-focus

Conversation

@Ovgodd
Copy link
Collaborator

@Ovgodd Ovgodd commented Feb 5, 2026

Purpose

Improve keyboard accessibility when switching document filters by moving focus to the
docs list title after navigation

This PR follows #1854 which was closed after renaming the branch from fix/docs-focus-target-filters to fix/navigation-focus.

Proposal

  • Focus the docs mainvcontent tafter filter navigation

@Ovgodd Ovgodd requested a review from AntoLC February 5, 2026 10:13
@Ovgodd Ovgodd self-assigned this Feb 5, 2026
@Ovgodd Ovgodd marked this pull request as ready for review February 5, 2026 10:13
Explain focus shift to match skip-to-content behavior.

hook useRouteChangeCompleteFocus

Positionne the focus on the first target or main element after a route change.
@Ovgodd Ovgodd force-pushed the fix/navigation-focus branch from fc4a6af to 48df681 Compare February 5, 2026 10:13
@github-actions
Copy link

github-actions bot commented Feb 5, 2026

Size Change: +153 B (0%)

Total Size: 4.2 MB

Filename Size Change
apps/impress/out/_next/static/63e3587c/_buildManifest.js 0 B -831 B (removed) 🏆
apps/impress/out/_next/static/226770b9/_buildManifest.js 831 B +831 B (new file) 🆕

compressed-size-action

Comment on lines +73 to +75
onClick={() => {
handleClick();
}}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary.

'(prefers-reduced-motion: reduce)',
).matches;

(mainContent as HTMLElement | null)?.focus({ preventScroll: true });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(mainContent as HTMLElement | null)?.focus({ preventScroll: true });
mainContent.focus({ preventScroll: true });

@Ovgodd Ovgodd changed the title ♿️(frontend) focus docs list title after filter navigation ♿️(frontend) focus docs list content after filter navigation Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants