Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block switcher rmenu accessibility and labeling improvements #62931

Open
afercia opened this issue Jun 27, 2024 · 0 comments
Open

Block switcher rmenu accessibility and labeling improvements #62931

afercia opened this issue Jun 27, 2024 · 0 comments
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Design Feedback Needs general design feedback. [Package] Block editor /packages/block-editor [Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented Jun 27, 2024

Description

This came into my mind while providing a11y feedback on #60810

The block switcher opens a dropdown menu that is an ARIA menu pattern. ARIA menus can only contain children with role menuitem, menuitemcheckbox, menuitemradio and, optionally, groups with separators.

Visually, the menu is spit into two main groups. Semantically, there are two main groups as well. See attache dscreenshot to compare the visuals with the accessibility tree.

Screenshot 2024-06-27 at 16 34 07

However, while the first group is labeled 'TRANSFORM TO`, the second group is unlabeled.

As a user, I'm not sure I would understand why there's a visual separation in two groups. What the difference between the two groups is?

Semantically, it doesn't make much sense labeling only the first group. Grouping items together makes only sense if the scope and purpose of the group is clear and meaningful. Is there a good reason to have two main groups in the first place? If there is one, than both groups should be visually and semantically labeled,

Note: the third group with the 'this block is connected' information should be removed as pointed out on #60810 (comment)

Step-by-step reproduction instructions

  • Select a block.
  • Open the block switched from the block toolbar.
  • Note: if the block is connected to external sources via the Bindings API, it will show a third group at the bottom. This is not much relevant for this issue.
  • Observe the menu is visually split in two groups;
  • Observ the second group is not labeled.
  • Optionally, inspect the accessibility tree in your browser dev tools and observe the secodn group is unlabeled.

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

@afercia afercia added [Type] Bug An existing feature does not function as intended [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Block editor /packages/block-editor Needs Design Feedback Needs general design feedback. labels Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Design Feedback Needs general design feedback. [Package] Block editor /packages/block-editor [Type] Bug An existing feature does not function as intended
1 participant