Skip to content

Improve route-change focus management for screen readers#112

Merged
mikewheeleer merged 1 commit into
Talenttrust:mainfrom
deslawson:main
Jun 19, 2026
Merged

Improve route-change focus management for screen readers#112
mikewheeleer merged 1 commit into
Talenttrust:mainfrom
deslawson:main

Conversation

@deslawson

Copy link
Copy Markdown
Contributor

Created src/components/RouteAnnouncer.tsx that uses usePathname to detect navigation, focuses the

landmark, and updates a hidden role="status" region with the

text (falling back to the pathname). Mounted it in src/app/layout.tsx inside the provider tree alongside tabIndex={-1} on . Includes 7 comprehensive tests, JSDoc, and documentation in docs/components/Accessibility.md.

Closed #106

 Created src/components/RouteAnnouncer.tsx that uses usePathname to detect navigation, focuses the <main id="main-content"> landmark, and updates a hidden role="status" region with the <h1> text (falling back to the pathname). Mounted it in src/app/layout.tsx inside the provider tree alongside tabIndex={-1} on <main>. Includes 7 comprehensive tests, JSDoc, and documentation in docs/components/Accessibility.md.

Closed Talenttrust#106
@mikewheeleer

Copy link
Copy Markdown
Contributor

really good a11y fix, thanks for caring about screen reader users. lgtm 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Manage route-change focus so screen readers announce page navigation

2 participants