-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Remove accordion
from details block keywords
#51597
Remove accordion
from details block keywords
#51597
Conversation
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.
👍
It's not an accordion block, but I am concerned about discoverability. If you're not a developer, it will be difficult to discover the Details block, which is a suitable (and accessible) replacement for accordions in most scenarios. |
We could always add an accordion block... |
Sure! |
I would be strongly in favour of an accordion block! But making the details block discoverable as an accordion sets an unhelpful precedent. An accordion has requirements and needs to be accessible in a manner that the details block doesn't support. They are two different things even if on the surface they seem similar. |
The block has its own name; it's not an accordion. If the block was named "Accordion" that'd be suggesting it was an accordion wholesale. I equate this change to if we removed the "image" keyword from the Cover and Media & Text blocks. |
That's really not the same thing. The The only reason to add But if people start using the Details block as a replacement for accordions, instead of actual accessible accordions, we'll create more accessibility issues because you can't navigate/jump to a details block like you can to an accordion. When people search for The details block is fantastic when you need to add an aside, when you need to add information that is helpful but not primary, which is why you can't inherently navigate/tab/announce a heading in the summary section of the Details block. Most people use show/hide (aka accordion functionality) for important things like FAQs and tabs with lots of valuable information that you do need to be able to jump and navigate through. We shouldn't encourage people to use the Details block for things like an FAQ. |
What?
This PR simply removes the keyword
accordion
from the Details block's block.json file, to stop the Details block from being suggested if someone searches foraccordion
in the Block Inserter.Why?
I know there has been lots of discussion around whether a details block is an accordion or not and the journey to bring the details block to fruition has been a long one. However, the details block does not serve as an accessible accordion pattern since it's not navigable. It's not a good idea to encourage people to think of the Details block as an accordion alternative.
Some helpful articles and resources: