Skip to content

Conversation

@sunyatasattva
Copy link
Contributor

What?

The block toolbar button to add new Accordion Items within an Accordion block, only spells “Add”, which is highly ambiguous. This PR merely changes the label to spell out “Add Accordion Item” instead, which is in line with the label appearing in the inserter and similar behavior in the Tabs block.

Testing Instructions

  1. Add an Accordion block.
  2. Select it and verify that the toolbar button spells “Add Accordion Item”.

Screenshots or screencast

Before After
Screenshot 2025-11-04 at 13 27 50 Screenshot 2025-11-04 at 13 15 14

@github-actions
Copy link

github-actions bot commented Nov 4, 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: sunyatasattva <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: jasmussen <[email protected]>
Co-authored-by: mikachan <[email protected]>

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

@cbravobernal cbravobernal added [Type] Enhancement A suggestion for improvement. [Block] Accordion Affects the Accordion Block labels Nov 4, 2025
@cbravobernal cbravobernal added the Backport to WP 6.9 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Nov 4, 2025
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

I believe the current terminology was a deliberate decision. See: #71388

Adds an "Add" button to the Accordion block toolbar:

image

This implementation is based on the "Add" button in the Gallery block:

image

The toolbar may have various buttons added by the developer. Furthermore, the text Add Accordion Item seems too long. In addition, it might be even longer depending on the locale.

Personally, I prefer to keep it as Add. Or, it might be possible to make it slightly shorter, like Add item

cc @mikachan @WordPress/gutenberg-design

@sunyatasattva
Copy link
Contributor Author

I agree that “Add Accordion Item” might feel too long, but “Add” is way too short and ambiguous. On the extreme case, imagine being on a screen reader: “Add” is completely confusing.

The new Tabs block uses “Add tab”, and I think that should be the direction. I didn't know about the gallery, and I was just about to go test it to see what it does, when it literally dawned to me: even in this conversation, as I haven't used the Gallery block too much, I have no clue what “Add” might do. Does it add an image to the gallery, or a gallery, or a section?

Especially because, as you mention, the toolbar can be extended, “Add” is even more pernicious: any developer could insert an “Add” button, so you wouldn't really know what it does and if that's specific to the current Accordion block, or is something that gets inserted in all toolbars.

“Add tab” has the luck of being short in the English language. But “Add Accordion Item” in Chinese would be 新增折叠项 (“Add tab” would be 新增标签页, same length). So, while I symphatize with it, I feel that using the length argument is also needlessly anglo-centric: in any label in our UI, we can never predict how long it would be in all languages.

With that said, I would say that at the very least we should go for “Add item”, or “Add section”.

@t-hamano t-hamano added the Needs Design Feedback Needs general design feedback. label Nov 5, 2025
@jasmussen
Copy link
Contributor

Thanks for the ping. I agree with both of you, but we have to choose between tradeoffs:

  • Do we remain consistent with other nesting containers and their "Add" actions, and account for mobile?
  • Do we break consistency for clarity and risk the toolbar getting cropped on mobile?

I want to not have strong opinions on which of the above two we choose, but possibly a middleground would be "Add item" or "Add section" as noted (note, sentence case).

And thank you for contributing!

@t-hamano
Copy link
Contributor

t-hamano commented Nov 5, 2025

Thank you for the feedback! Let's change it to Add item. Following this, we should probably also change Add image in the Gallery block's toolbar.

If possible, let's merge and backport this PR before RC1, when string freezing will start.

@mikachan
Copy link
Member

mikachan commented Nov 5, 2025

Let's change it to Add item. Following this, we should probably also change Add image in the Gallery block's toolbar.

+1 to this! Thanks all 🙇

Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sunyatasattva, Based on the discussion, I have changed the text to Add item. Thanks for your contribution!

@t-hamano t-hamano merged commit af532f0 into WordPress:trunk Nov 5, 2025
43 of 44 checks passed
@github-project-automation github-project-automation bot moved this from 🔎 Needs Review to ✅ Done in WordPress 6.9 Editor Tasks Nov 5, 2025
@github-actions github-actions bot added this to the Gutenberg 22.1 milestone Nov 5, 2025
@github-actions github-actions bot removed the Backport to WP 6.9 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Nov 5, 2025
gutenbergplugin pushed a commit that referenced this pull request Nov 5, 2025
* Change Accordion block toolbar label to spell “Add Accordion Item”

* Update packages/block-library/src/accordion/edit.js

---------

Co-authored-by: sunyatasattva <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: jasmussen <[email protected]>
Co-authored-by: mikachan <[email protected]>
@github-actions github-actions bot added the Backported to WP Core Pull request that has been successfully merged into WP Core label Nov 5, 2025
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

I just cherry-picked this PR to the wp/6.9 branch to get it included in the next release: 640fcf4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backported to WP Core Pull request that has been successfully merged into WP Core [Block] Accordion Affects the Accordion Block Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.

Projects

Development

Successfully merging this pull request may close these issues.

5 participants