Tabs: Rename tabs blocks to follow WCAG Tabs pattern#77418
Conversation
cf4bad5 to
50cd83c
Compare
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
t-hamano
left a comment
There was a problem hiding this comment.
Thanks for working on this!
No changes were made to block names (
core/...), only user-facing labels/titles were updated.
I think changing only the visual title can be confusing because it creates an inconsistency between the title and the block name or CSS class name.
Fortunately, as this block is still in an experimental status, we can make breaking changes. Could you confirm and make changes based on the following points?
- Directory name (Example: from
packages/block-library/src/tabtopackages/block-library/src/tab-panel) - Block name (Example: from
core/tabtocore/tab-panel) - CSS classname and CSS selector (Example: from
.wp-block-tabto.wp-block-tab-panel) name,parent,allowedBlocksfield inblock.json- Context keys (Example: from
core/tabs-menu-item-labelto `core/tabs-tab-label)
Most of the work should be complete with bulk replacement in a code editor.
Alternatively, it should be sufficient to instruct the AI agent to change directory names, file names, variable names, etc., in accordance with the visual title change of the tab-related block., for example.
|
@t-hamano Thanks for the review, that makes sense. I’ll go ahead and make the changes. Quick question: do we also want to update any icon names (if they reference the old block naming), or should those remain unchanged? |
That's a good question. I think we should update all related icon names as well. As a point of caution, this would be a breaking change for consumers who use the You can create a new "Breaking Changes" section under the "Unreleased" section. |
a9b388f to
6ff9c6d
Compare
|
@t-hamano Thanks for the clarification! I’ve made the updates accordingly. Summary of changes:
Tested on my end (adding/ removing tabs, etc.) |
There was a problem hiding this comment.
Thanks for the update! This might be a bit detailed, but I think we can update the following as well.
use-tab-menu-sync.js>use-tab-list-sync.jsuseTabMenuSync>useTabListSynctabsMenuClientId>tabListClientIdmenuItems,menuItemCountChange,menuItemsInserted,prevMenuItems,newMenuItemBlocketc. > It would probably be best to replacemenuItemswithtabs.tabPanelClientId>tabPanelClientId
Maintaining consistency in terminology throughout the project will be helpful for other contributors when they read the code in the future.
17f9dbb to
e5d06a0
Compare
|
Hi @t-hamano I’ve updated the remaining references to keep the terminology consistent (useTabListSync, tabListClientId, tabs, etc.) + tested the functionality (adding, reordering tabs, etc.). Let me know if anything else needs adjustment. |
t-hamano
left a comment
There was a problem hiding this comment.
LGTM! I believe everything has been processed correctly. Please check the last feedback I left.
Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>

What?
Closes #77341
Updates the naming of Tabs inner blocks to follow a clearer pattern aligned with WCAG Tabs pattern
Why?
The current naming of Tabs-related blocks (e.g., “Tabs Menu”, “Tab Menu Item”) can be confusing for users.How?
Updated block titles in
block.jsonfiles:Tabs Menu→Tab ListTab Menu Item→TabTab→Tab PanelTab Panel→Tab PanelsUpdated generated documentation to reflect the new naming.
No changes were made to block names (
core/...), only user-facing labels/titles were updated.Testing Instructions
Screenshots or screencast
Use of AI Tools
Used AI assistance (Claude.ai) for drafting the PR description. All code changes were implemented and reviewed manually.