Skip to main content
Brand and assets
Build
Monitor and contribute
/
Component library
  • All components
  • Buttons & actions
  • Forms & inputs
  • Layout & containers
  • Overlays
  • Feedback & status
  • Data display
  • Typography
  • Accessibility
    • AccessibilityMenu
    • PageTitleAnnouncer
    • SkipLinks
  • Contrib
  • Deprecated
  • Accessibility
  • PageTitleAnnouncer

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
Component health
Source
View on Github
Storybook
View in 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>, or document.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.

PageTitleAnnouncer props

No props
Edit this page
Previous
AccessibilityMenu
Next
SkipLinks
  • What is it?
  • How to use it