Recommendation for accordions with checkboxes #1153
-
Hey DSYS! I'm thinking of using accordions with checkbox groups in Event Streams. Are there any recommendations on how to use these components together? Here's a clickable prototype to show how I'm thinking it will work. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hey @mindytom ! This is definitely a tough problem. Because of the 3 levels of nesting and expanding/collapsing you're trying to achieve here, what you'd need is a Tree component to appropriately communicate the hierarchy of all the children elements. Without a Tree, it'll be unclear to a screenreader whether "Workflow" is a child of "Reservation" or "Taskrouter". (We don't have a Tree yet, though, but it is on our roadmap.) However if you're able to simplify the list to 2 levels only, we'd recommend removing the column of checkboxes on the left, and putting the Checkbox Groups inside each Disclosure so a customer would expand it and see something like:
This makes the relationship between the checkboxes and their labels a bit more straightforward. It could also make it a clearer what a customer is selecting at the top level (e.g., they're selecting "All Voice events", and not an item called "Voice") You could also potentially make "Voice", "Taskrouter", and "Messaging" text headings, and have just the children under Taskrouter show up as Disclosures. Since the interaction you've mocked up is a little bit similar to "expandable table rows" we've seen, I'd recommend reaching out to folks like @kylegilbreath, @syeo, and @PoojMenon, who have designed alternatives to expandable rows. Whatever your solution ends up being, please let us know where you took it! I'm sure your solution here could help out lots of folks working with complex pages like this. |
Beta Was this translation helpful? Give feedback.
Hey @mindytom ! This is definitely a tough problem.
Because of the 3 levels of nesting and expanding/collapsing you're trying to achieve here, what you'd need is a Tree component to appropriately communicate the hierarchy of all the children elements. Without a Tree, it'll be unclear to a screenreader whether "Workflow" is a child of "Reservation" or "Taskrouter". (We don't have a Tree yet, though, but it is on our roadmap.)
However if you're able to simplify the list to 2 levels only, we'd recommend removing the column of checkboxes on the left, and putting the Checkbox Groups inside each Disclosure so a customer would expand it and see something like: