-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Rename Accordions block to Accordion #71222
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
Conversation
|
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. |
|
Size Change: +15 B (0%) Total Size: 1.92 MB
ℹ️ View Unchanged
|
|
Thanks @mikachan ! The block names seem more consistent to me this way. Let's see what others think about it. Maybe we should also update the old description “A single accordion that displays a header and expandable content.” for the “Accordion Item” block? |
Yes, good point, maybe something like: "A single accordion item that displays a header and expandable content."? |
|
Renaming 'Accordions' to 'Accordion' to align with the W3C guidelines makes sense. I have to get used to "Accordion Item" as a name for the inner content, because we haven't used the word "Item" before for any other block and we haven't defined globally what an "Item" really is. |
|
No strong opinion on my part. It seems the important piece for discoverability is that if you search for "accordion", you'll find it (✅), and that there's a good block preview. |
@hanneslsm We do have "List Item" as an inner block of the List block, so that's similar, but I'd be happy with "Accordion Content" too, as that's aligned with "Post Content" and "Comment Content", and "content" is more descriptive. If no one has any objections, I'll include that name change ("Accordion Item" > "Accordion Content") in this PR, and then we can land this PR in time for the first GB 21.5 release candidate. |
@mikachan True, totally forget about this one! I'm fine with both. |
# Conflicts: # packages/block-library/src/accordion/edit.js
You can use the
It seems to be suggested to use the third person that starts with a verb. See: |
# Conflicts: # packages/block-library/src/accordion-content/icon.js # packages/block-library/src/accordion-content/index.js # packages/block-library/src/accordion/icon.js # packages/icons/src/index.ts # packages/icons/src/library/accordion-content.tsx # packages/icons/src/library/accordion-item.tsx
|
Thanks @t-hamano! I've updated all the Accordion block descriptions to match the guidelines discussed in that issue. |
|
Flaky tests detected in 501f0aa. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/17073281030
|
t-hamano
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost looks good! Finally, I think the description needs to be standardized: it's Sentence case, not Title Case, and it ends with a period.
- Accordion:
Displays a group of accordion headers and associated expandable content. - Accordion Content:
Displays a section of content in an accordion, including a header and expandable content. - Accordion Header:
Displays an accordion header. - Accordion Panel:
Displays an accordion panel.
P.S. While breaking changes are probably acceptable for now, please note that if these blocks become stable in the future, it will be difficult to change the namespace of the blocks.
* Rename Accordions to Accordion * Rename accordion-item * Update block descriptions * Tweak block descriptions Co-authored-by: mikachan <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: alexandrebuffet <[email protected]> Co-authored-by: hanneslsm <[email protected]> Co-authored-by: jasmussen <[email protected]>

What?
Addresses this comment: #21584 (comment)
cc @alexandrebuffet
This PR renames the recently merged Accordions block (#64119) to "Accordion". This aligns with how this pattern is described by W3C: https://www.w3.org/WAI/ARIA/apg/patterns/accordion/.
Pinging some folks who originally had input on this name in the discussion in the original PR: @jasmussen, @LukaszJaro, @Jabe64, @Nyiriland, @hanneslsm, @MaggieCabrera
This PR also renames the inner block, "Accordion Item", to "Accordion Content". See this discussion for details: #71222 (comment)
Why?
To align more closely with how this pattern is usually described, e.g. https://www.w3.org/WAI/ARIA/apg/patterns/accordion/.
How?
Testing Instructions
Screenshots or screencast