Skip to content

Site Editor: misleading speak() messages when switching mode and navigating #51578

@afercia

Description

@afercia

Description

In the Site Editor, the speak() audible messages sent to the ARIA live regions are misleading and do not reflect the actual state of the UI.

Note: In the screenshots below, I'm using a quick.n dirty plugin to dump to the console the speak() messages.

1
On first load, screen reader users will hear the following messages:

Polite Speak message:
You are currently in edit mode. To return to the navigation mode, press Escape.

Assertive Speak message:
Now displaying: Home ‹ Template ‹ Editor ‹ WordPress Develop — WordPress
Screenshot 2023-06-16 at 13 56 24

I'd say they're both incorrect. They made sense in WordPress 6.1, when the Site Editor didn't have the 'view mode'. Now that the 'view mode' initially renders the navigation panel and the canvas preview, these messages don't communicate to users the actual state of the UI:

  • 'You are currently in edit mode.': technically the editor within the canvas preview is in edit mode. However, the UI is in a completely different mode, where users can't actually 'edit'. They can only navigate and preview.
  • 'Now displaying: Home ‹ Template ...': while it is true that the editor within the canvas preview displayes the home template, the message should instead communicate to users where they actually are: they're in the top level of the navigation: 'Design'.

2
When switching the editor to 'edit mode', the previous two messages are repeated again. That's very confusing. As a useer, I wouldn't be able to understand what changed.

Screenshot 2023-06-16 at 13 56 33

3
Lastly, when navigating forth and back through the 'top level' items in teh navigation e.g. Design, Navigation, Styles, Pages, Templates, Library, the 'now displaying' message is always the same and it always refers to the 'home template':

This also happens each time when switching back from 'edit' mode to 'view' mode by clicking 'Open navigation'.

Now displaying: Home ‹ Template ‹ Editor ‹ WordPress Develop — WordPress
Screenshot 2023-06-16 at 13 58 10

This 3rd problem has more to do with the single-app routing mechanism. Each state of the navigation is actually integrated in the browser history. Pressing the browser Back and Forward buttons does updates the navigation panel state. However, the document title isn't updated. Anay routing system should always update the document title otherwise the entries in the browser's history are meaningless and not usable. Just press and holt the back button to see the entries have all the same name:

Screenshot 2023-06-16 at 13 58 18

I will split this 3rd point in a separate issue. For now, I'd suggest to shorten the 'now displaying' message: it is very long and verbose. I'm not sure users actually need to hear each time the second part of the string. For example this:

Now displaying: Home ‹ Template ‹ Editor ‹ WordPress Develop — WordPress

Could be shortened to:

Now displaying: Home ‹ Template

Step-by-step reproduction instructions

  • Go to the site editor.
  • Either use a screen reader to hear the speak messages, or inspect the source and observe the text that changes within the ARIA live regions.
  • Observe the messages are misleading and do not reflect the actual state of the UI.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[Package] Edit Site/packages/edit-site[Priority] HighUsed to indicate top priority items that need quick attention[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions