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

Enhance block switcher dropdown with accessible group labels #67397

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

sarthaknagoshe2002
Copy link
Contributor

Fixes: #62931

What?

This PR updates the block switcher dropdown menu to include a label for the second group, titled "Advanced Transformations." The first group retains the "Transform To" label.

Why?

The previous design lacked a label for the second group, causing potential confusion for users. Grouping items without clear labeling made the menu less intuitive and accessible. Adding meaningful labels enhances usability and ensures compliance with ARIA menu patterns.

How?

  1. Added "Advanced Transformations" as a label for the second group.
  2. Retained the "Transform To" label for the first group to maintain existing functionality.

Testing Instructions

  1. Open the block switcher by selecting a block and clicking the block switcher option in the toolbar.
  2. Verify the first group is labeled "Transform To."
  3. Confirm the second group is labeled "Advanced Transformations."
  4. Inspect the accessibility tree in browser dev tools and ensure both groups have appropriate ARIA labels and role attributes.
  5. Check for any visual or functional regressions in the block switcher dropdown.

Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: sarthaknagoshe2002 <[email protected]>
Co-authored-by: afercia <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano 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). [Feature] Block Transforms Block transforms from one block to another [Package] Block editor /packages/block-editor labels Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block Transforms Block transforms from one block to another [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Block editor /packages/block-editor [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Block switcher menu accessibility and labeling improvements
2 participants