Click a link on a traditional website and the browser loads a new document. Focus resets to the top of the page, the screen reader typically reads out the new page title, and the browser tab changes. Click the same link in a single-page app and the router quietly swaps some components. The URL changes. Nothing else does.
Focus is still on the link the user pressed, or on nothing at all if that link was removed. The screen reader says nothing. The tab still reads “Dashboard” while the user is looking at Billing. Someone watching the screen sees a new view. Someone who cannot see it gets no signal that the click did anything.
This is one of the most common problems in client-side apps, and it is cheap to fix once in the router layer instead of screen by screen.
What the browser stops doing for you
A full page load comes with side effects that people rely on without noticing. Focus returns to the start of the document. Assistive technology picks up the new title. The history entry describes the new page. A client-side router updates the address with the History API and renders new content in place, so none of that happens unless your code reproduces it.
For a keyboard user, the next Tab press simply continues from wherever focus was. If the link still exists in the navigation, that means walking back through the header and menu to reach the content. If the link was removed, the browser falls back to the document, and where the next Tab press lands varies between browsers. For a screen reader user, a click that produces no speech reads as a click that failed, and people often press it again.
Where WCAG applies
WCAG has no criterion called “route change”, so audits log these failures against whichever criterion fits what broke. Three come up most often:
- 2.4.2 Page Titled (Level A): pages have titles that describe topic or purpose. W3C’s Understanding document says that in single-page applications, where distinct views are served from one page, the title should change dynamically to reflect the current view.
- 2.4.3 Focus Order (Level A): focusable components receive focus in an order that preserves meaning and operability. Leaving focus stranded on the previous view’s link, so the next Tab walks the navigation again, is a frequent finding.
- 4.1.3 Status Messages (Level AA): relevant when you announce a change through a live region instead of moving focus, because status messages must reach assistive technology without taking focus.
Auditors differ on which of these they cite. Fix the behavior and the label stops mattering.
The pattern: set the title, then move focus
After every navigation to a new view, do two things in order: update document.title, then move focus to the view’s main heading.
js
function focusNewView(pageTitle) { document.title = pageTitle; const heading = document.querySelector('main h1'); if (!heading) return; // tabindex="-1" lets script focus the heading // without adding it to the Tab order heading.setAttribute('tabindex', '-1'); heading.focus();}
Call it from your router’s after-navigation hook, once the new view has rendered. Because the heading has focus, a screen reader announces it, and the next Tab press lands on the first interactive element of the new content instead of back in the header. Use a title that identifies the view, such as “Billing | Acme”, rather than the app name on every route.
If a view has no suitable h1, focus the main landmark with the same tabindex="-1" approach. Keeping to one h1 per view makes the whole pattern easier to maintain.
Where it goes wrong
Focusing too early is the usual first bug. If the route renders a loading skeleton and the real heading arrives with the data, the query finds nothing or the wrong element. Render the h1 as part of the view and load the data underneath it, or focus the main container instead.
Moving focus on every URL change is the second. Filters, sorting, tabs and pagination often update the URL without changing the page. Sending focus to the heading each time throws people out of the control they were using. Leave focus where it is and report the outcome, for example “24 results”, through a status message.
Back and forward need the same treatment as any other navigation: new title, focus on the heading. Restoring the earlier scroll position is a bonus, not a substitute.
A sticky header can also sit on top of the heading you just focused. scroll-padding-top fixes that, as we covered in Sticky Headers and Cookie Banners Are Hiding Your Keyboard Focus.
Finally, a programmatically focused heading may show a focus outline in some browsers. Some teams remove it on that one element, since the heading is not a control. If you do, scope the rule to that element and never to everything.
Announcing without moving focus
Some frameworks ship a route announcer. The Next.js documentation describes one that reads document.title, then the h1, then the URL path. That helps screen reader users, but announcing a change is not the same as positioning keyboard focus, so check separately where focus ends up in your app.
If you build your own announcer, a polite live region with role="status" that receives the new title works for screen reader users. Pair it with focus management instead of replacing it.
How to test it
- Use the keyboard. Activate a navigation link, then press Tab once. You should reach the first interactive element of the new content, not the header again.
- Listen with a screen reader, such as NVDA with Firefox or VoiceOver with Safari. After activating a link, you should hear the new view’s title or heading without navigating to find it.
- Check the browser tab and the history list. Each view should have its own descriptive title.
- Repeat the check with the back and forward buttons.
Then lock it in with an automated check in your end-to-end suite, for example with Playwright:
js
await page.getByRole('link', { name: 'Billing' }).click();await expect(page).toHaveTitle(/Billing/);await expect(page.getByRole('heading', { level: 1 })).toBeFocused();
A scanner sees a valid page at each route. It does not see what happened between them, which is the gap we describe in why a 100 Lighthouse score does not mean you are compliant. A test like the one above is the kind of check that automation can hold, and our guide to adding accessibility testing to your CI/CD pipeline shows where it fits.
Next step
Route handling is a small fix when it is made once in the router layer, and an expensive one to rediscover screen by screen. If you want a manual review of how your app behaves between views, or want to audit, fix and document a defined scope on a fixed timeline through the 30-Day Sprint, you can book a call with an accessibility expert.
.png)
.png&w=3840&q=75)