Button Groups and Disclosure Accessibility #1202
-
Button Groups Disclosure Accessibility |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @seanmateer For the button group, there's no way to force the current Paste buttons into working. Composing a custom button group out of Box is the best bet here. I started a CodeSandbox to show how this might be done. There's still a lot to flush out, i.e. hover states, pressed states, etc, but it should give you an idea of what might be involved. As for the disclosure, we designed/developed that in a way that you can put any content inside. The only real concern is not nesting focusable elements in the disclosure heading: https://paste.twilio.design/components/disclosure#accessibility I think the biggest accessibility concern is making sure something is announced to users when the content is changed via the button press. |
Beta Was this translation helpful? Give feedback.
-
For the Button groups what you'll need is actually the Radio button group as you can only select one at a time and you need the ability to communicate selected state correctly. That's not on our road map for a while though by the looks of things, maybe May? https://paste.twilio.design/roadmap/ You are probably going to hate this, but I'm going to say it anyway: Have you considered Tabs? Main justification is that you're just switching two views of content. |
Beta Was this translation helpful? Give feedback.
For the Button groups what you'll need is actually the Radio button group as you can only select one at a time and you need the ability to communicate selected state correctly.
That's not on our road map for a while though by the looks of things, maybe May? https://paste.twilio.design/roadmap/
You are probably going to hate this, but I'm going to say it anyway:
Have you considered Tabs? Main justification is that you're just switching two views of content.