The new site editor Browse Mode breaks ARIA landmark and navigateRegions
#46509
Labels
[Feature] Site Editor
Related to the overarching Site Editor (formerly "full site editing")
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Type] Bug
An existing feature does not function as intended
[Type] Regression
Related to a regression in the latest release
Description
The new site editor Browse Mode introduced in #44770 breaks ARIA landmark and
navigateRegions
.It's a two-fold issue:
1. Native semantics
As also stated in the Accessibility readme,
It is a best practice to include ALL content on the page in landmarks, so that screen reader users who rely on them to navigate from section to section do not lose track of content.
However, the new navigation sidebar isn't an ARIA landmark. Only the<nav>
element within it is a native landmark but that's not enough. The whole sidebar should be a landmark otherwise there's some content that lives outside any landmark. This is important and it's not just about semantics: native screen reader features allow users to jump through landmarks as a convenient navigation mechanism. Leaving some content outside landmarks is less than ideal and violates the best practice established in this project documentation.2. Navigating regions with keyboard shortcut doesn't work.
navigateRegions
allows all keyboard users to navigate through the main editor sections. Ideally, these sections should be the landmarks themselves so that the editor provides all keyboard users with an interaction that is equivalent to the screen readers landmark navigation. In the previous implementation, the header (the top bar) and the drawer (the navigation) were placed within theInterfaceSkeleton
component, which provides the navigate regions functionality.Instead, in the new implementation:
InterfaceSkeleton
. Therefore,navigateRegions
doesn't work for this section of the editor.InterfaceSkeleton
. Therefore,navigateRegions
doesn't work for this section of the editor.Note:
There's one more issue with
navigateRegions
which pre-dates to #44770. When a block is selected, thespacing sizes control
is available in the block settings sidebar. This control has a fieldset with arole=region
that conflicts withuseNavigateRegions
. This role should be removed. See #42173 (comment)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: