-
Notifications
You must be signed in to change notification settings - Fork 355
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
Add accordion example that allows all panels to be collapsed #304
Comments
Yes, yes, yes! You should totally be able to close all panels, it’s so annoying that you can’t. |
what about an example where the accordion can close completely? I keep clicking to close the last open panel but it won't. |
It should have a way to open all panels too... I think most users who are blind would like to be able to open the whole thing from the beginning. |
@DavidMacDonald I think that is what the disclosure design pattern is for. That does exactly what you describe. |
Accordions come in all sorts of types.
I don't want to mandate one pattern over another as in different circumstances different ones are appropriate. Bryan's JS has a simple way to modify these - look in setup.js // Allow for each toggle to both open and close individually |
As @jnurthen pointed out, the code for the accordion example is configurable. That does mean that it would be a simple change for us to create a different behavior on the current example page. Alternatively, we could easily have two configurations. Showing only one configuration implies a preference. I have read some research that suggests that forcing one panel to always be open has negative impact on UX ... I'll see if I can dig that up. That would be another reason for adding a page with an alternative configuration. If we do add an example where all panels can be collapsed, then we may want to consider adding a button for expand/collapse all. |
Yes, by all means... I think the accordion should have expand all and collapse all... buttons (or toggle) |
…es, implement APG code guidelines (pull #1830) Updates the accordion example to resolve issues #1819, #616, #304, and #1477. Made the following Behavior changes: * Removed optional arrow key support. * Removed requirement forcing one section to always be expanded. * Removed constraint limiting only one section to be expanded at a time. * Updated tests to reflect behavior changes. * Removed section that talked about focus styling for "enhanced keyboard interaction". * Removed arrow key/home/end rows in example page keyboard table. * Removed aria-disabled row in example page attributes table. Code cleanup: * Updated JS file to a class syntax. * Update classnames to be lowercase. * Fix some border-radius issues in focus styling. * Updated example page wrapper id attributes to match other example pages.
I like the accordion example but there is no way to close all.
The text was updated successfully, but these errors were encountered: