-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 menu accessibility and labeling improvements #62931
Comments
@afercia Maintaining this separation is necessary as the groups serve distinct purposes: the first focuses on basic transformations, while the second offers more advanced or specialized options. Let me know your thoughts! |
@sarthaknagoshe2002 thanks, yes I'd totally agree the second group needs a visible title to be properly labeled. This issue is still waiting for some design feedback though. Cc @WordPress/gutenberg-design |
Umm I feel we can at least add the label as a temporary fix until we get the design feedbacks for this from the design team. |
Also, I was not able to reproduce this
|
@afercia did you see the latest designs inhttps://github.com//issues/40208, which propose utilising |
@jameskoster thanks, will comment there. |
@afercia Do you think that we should move ahead with the changes I suggested as a temporary fix until the new design is implemented? |
@sarthaknagoshe2002 personally I'd like to move ahead with your PR. As I commented on the issue with the new design, I'm not sure the new designis any read as it mixes together differenc concept sin the same menu and it should be reconsidered IMHO. |
@afercia Then lets get the PR merged. |
@sarthaknagoshe2002 I'm changing my mind. The more I think at it, the more I lean towards showing all transforms within the same group, with no separation. Thanks for your patience 🙏🏻 Looking a bit more into the logic of this menu, so far it shows some 'priority' transforms that are shown at the top only for some text blocks. When there are both priority transforms and other transforms, the 'rest' of the transforms is shown in a separate group. While I agree to show the priority transforms at the top, I'm not sure it makes sense to visually and semantically separate the two groups. Why they should be separated in the first place? I would argue that this menu may show other transforms that are conceptually different from ordinary transforms, for example: the block variations (e.g. for a Group block) are conceptually different from ordinary transforms, still they are shown together with all the transforms: In the screenshot below, from the left, the menus of the blocks: Paragraph, Image, Group, Quote. Basically I'm not sure why we should show a separation for the priority transforms and not for other logically grouped transforms like the cariations. At this point I'd tend to think it would be best to simplify and render only one The current PR at #67397 adds a label to the second group but I'm not sure it would be ideal in some cases. Screenshot: |
I tend to agree that the separation doesn't really add much, if anything it creates confusion by suggesting the transforms are different in some way. It's worse when Styles also appear. The most 'helpful' transforms are listed first, and that seems adequate to me. I'd welcome more feedback from @WordPress/gutenberg-design though. |
@afercia Thats completely fine. |
I would suggest to wait a couple days for more design feedback, if needed. Personally I'd lean towards removing the separation. |
@afercia Do you mind providing insights on what exactly needs design feedbacks to close this issue. |
As @jameskoster mentioned, It would be good to have the design team have a look at removing the separation between the groups, which seems the most sensible option. |
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 split into two main groups. Semantically, there are two main groups as well. See attached screenshot to compare the visuals with the accessibility tree.
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
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: