Accessibility: Announce on `<PageTitle />` changes
Created by: umpox
Description
Screen readers do not update when document.title
changes. This makes it very difficult for users to be aware that the content of the page has changed, particularly when navigating through a sidebar or a navbar. It seems the best approaches here are:
- Move focus to next relevant part of page (if suitable)
- Announce document.title changes to the screen reader through
aria-live
.
This PR focuses on the latter, it's also a recommended approach by deque (creators of axe).
Related issues (need checking):
- https://github.com/sourcegraph/sourcegraph/issues/34452
- https://github.com/sourcegraph/sourcegraph/issues/34481
- https://github.com/sourcegraph/sourcegraph/issues/35181
- https://github.com/sourcegraph/sourcegraph/issues/35143
- https://github.com/sourcegraph/sourcegraph/issues/35094
Test plan
App preview:
Check out the client app preview documentation to learn more.