Site Editor: routing should update the document title #47730
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Package] Edit Site
/packages/edit-site
[Type] Bug
An existing feature does not function as intended
Description
From a user experience perspective, navigation in Single Page Applications (SPA) should emulate as much as possible the 'traditional' navigation mechanism (page load).
The Site Editor is basically a SPA that implements a routing mechanism. So far so good, the routing mechanism works well.
However, the document title is not updated. It's always the same. This has a few consequences that aren't limited to accessibility. It's a known usability and accessibility issue with SPAs, at the point that Dan Abramov himself built a little tool to solve it, a few years ago. See https://github.com/gaearon/react-document-title
1
The entries in the browser history have all the same name. This makes impossible for users to efficiently use a native browser feature. When trying to navigate through the browser fully history, users can;t distinguish the history entries. To reproduce:
Screenshot:
2
Minor: Bookmarking a page is a native browsers feature. When bookmarking multiple Site Editor pages, by default they will all have the same name. Distinguishing the bookmarks would be impossible. Users would be forced to edit the bookmark title each time they bookmark a Site Editor page.
3
Important for a11y: Navigation through the Site Editor pages is announced with a
speak
message viauseTitle
. The message text appendsdocument.title
to the textNow displaying:
. Unfortunately, since the document title never updates, thespeak
message is always the same and it's basically useless.When navigating, screen reader users will always get the same audible message, e.g.:
Now displaying: Editor (beta) ‹ {site title} — WordPress
Screenshots:
Note: one more issue with SPAs navigation is about where initial focus should land after navigation. I will reate a separate issue for that.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: