<aside> 💡 A cross-cutting pattern for single-page applications. When the page doesn't fully reload, focus management becomes your responsibility — the browser won't do it for you.

</aside>

Why this matters

In a traditional multi-page site, the browser resets focus to the top of the page on navigation. In SPAs (React, Next.js, Angular, Vue), route changes swap content without a page load — focus stays wherever it was, or worse, lands on a now-invisible element. Screen reader users hear nothing change; keyboard users are stranded.


Route change pattern

What to do

Implementation


Dynamic content insertion / removal

Content added