Skip to content

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

Open
im3dabasia wants to merge 1 commit intoWordPress:trunkfrom
im3dabasia:fix/static-label-for-block-inserter
Open

Editor: Simplify Block Inserter Button Label and Remove Dynamic Label Behavior#68539
im3dabasia wants to merge 1 commit intoWordPress:trunkfrom
im3dabasia:fix/static-label-for-block-inserter

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

@github-actions
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
@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.

@Mamaduka Mamaduka 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] Inserter The main way to insert blocks using the + button in the editing interface labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Inserter The main way to insert blocks using the + button in the editing interface [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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Block inserter toggle: avoid dynamic label

3 participants