PageTitleAnnouncer
Announces the page title to screen readers when the route changes. Use on any client-side router, where the browser stays silent because there is no full page load.
Health
Source
Storybook
Playground
No Example
Accessibility
compliant
Platform
Web
- Overview
- Props
What is it?
A visually hidden live region that speaks the page title whenever document.title changes.
Browsers only read the title on a full page load. On a client-side route change, sighted users see the new page and screen reader users hear nothing. Next.js and Gatsby ship the same fix.
How to use it
Render it once, at the root of the application.
import { PageTitleAnnouncer } from "murray/web";
<HelmetProvider>
<PageTitleAnnouncer />
<SkipLinks>{/* The rest of the app */}</SkipLinks>
</HelmetProvider>;
- Works with any title source:
<Helmet>, React 19's native<title>, ordocument.title. - Only speaks when the title text changes, so each page needs its own title (WCAG 2.4.2).
- Web only. React Navigation announces screen headers on mobile.