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

Editor: Simplify Block Inserter Button Label and Remove Dynamic Label Behavior #68539

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

Conversation

im3dabasia
Copy link
Contributor

@im3dabasia im3dabasia commented Jan 7, 2025

Fixes : #68536

What?

  • Simplifies the Block Inserter button label to "Add" for better user-friendliness.
  • Removes the dynamic label behavior where the label changes from "Add" to "Close" when toggling the Block Inserter.

Why?

  • The dynamic label behavior was unnecessary, as visual and semantic cues like color inversion and aria-pressed/aria-expanded already convey the button's state.
  • Simplifying "Block Inserter" to "Add" improves usability by making the label more intuitive and user-friendly.

How?

  • Updated the button's label to consistently display "Add" regardless of whether the Block Inserter is open or closed.
  • Replaced the technical term "Block Inserter" with "Add" when the "Show button text labels" preference is disabled.

Testing Instructions

  1. Open the Post or Site Editor.
  2. Hover or focus on the Block Inserter button and observe the tooltip text (label).
  3. Expected: The label should display "Add" instead of "Block Inserter."
  4. Enable the preference Show button text labels from the top bar (Options > Preferences > Accessibility).
  5. Expected: The button should display "Add" as its text label.
  6. Open and close the Block Inserter.
  7. Expected: The label remains static as "Add" and does not change to "Close."

Screenshots or screencast

Before After
image image
Before After
image image
Before After
image image

Copy link

github-actions bot commented Jan 7, 2025

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: im3dabasia <im3dabasia1@git.wordpress.org>
Co-authored-by: afercia <afercia@git.wordpress.org>

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

@im3dabasia im3dabasia marked this pull request as draft January 7, 2025 20:02
@im3dabasia im3dabasia marked this pull request as ready for review January 7, 2025 20:10
Copy link

github-actions bot commented Jan 7, 2025

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Type-related labels to choose from: [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Technical Prototype, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core, Gutenberg Plugin.
  • Labels found: .

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@Mamaduka Mamaduka requested a review from afercia January 8, 2025 05:07
@afercia
Copy link
Contributor

afercia commented Jan 8, 2025

@im3dabasia thanks for your PR!. I'd suggest to wait a bit and see if #68531 gets merged. If it gets merged, there will be one more place where to fix the dynamic label.
Also, I'd like the discussion on #68536 to get some more feedback and settle a bit before attempting a pull request so to gather some more consensus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Block inserter toggle: avoid dynamic label
2 participants