Skip to content

[Accordion] expose internal Context #1106

Answered by benoitgrelard
seedy asked this question in Help
Discussion options

You must be logged in to vote

Hi @seedy,

Am I understand correctly that you are using both Accordion and RadioGroup primitives together for this?
If so I believe this is wrong and this kinda highlights the point:

Also, I notice I am nesting two button components: AccordionTrigger and RadioItem, which is invalid.

I think your accordion "styling" is perfectly sensible.
However, to me, the fact that it "looks" like a radio is just that: "styling".
It has nothing to do with accessibility, and in fact, mixing both patterns will result in broken accessibility.

In my mind what this is is simply an accordion, which happens to visually style the "active" state using a design similar to a radio item.
So I think that should be…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@seedy
Comment options

@seedy
Comment options

@seedy
Comment options

Answer selected by seedy
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants