Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

馃専Feature request: Accordion should use details/summary #127

Open
alexbjorlig opened this issue May 3, 2023 · 5 comments
Open

馃専Feature request: Accordion should use details/summary #127

alexbjorlig opened this issue May 3, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@alexbjorlig
Copy link
Contributor

Is your feature request related to a problem? Please describe.
If the accordion remove elements from the DOM, it's not very good for form elements.

Describe the solution you'd like
Details/summary instead.

Describe alternatives you've considered
N/A

Additional context
Details/summary have some cool features on Chrome/Edge, where they will auto-open when the user searches for something on the page.

@alexbjorlig alexbjorlig added the enhancement New feature or request label May 3, 2023
@TGlide
Copy link
Member

TGlide commented May 3, 2023

I'm not sure if I can promise that'll we'll use details summary, but I'll try! In any case, we should solve the form issue.

@alexbjorlig
Copy link
Contributor Author

What's the argument for not using details/summary - just trying to understand. From what I understand, details/summary is exactly what an accordion is. But I might miss some perspectives.

@TGlide
Copy link
Member

TGlide commented May 3, 2023

What's the argument for not using details/summary - just trying to understand. From what I understand, details/summary is exactly what an accordion is. But I might miss some perspectives.

We're overriding a lot of custom behaviour in our components to provide custom controls, kbd navigation and accessibility, so I worry about compatability. Same reason why we don't use a <dialog /> element on our Dialog component.

@AndreasHald
Copy link

I understand your concerns @TGlide, maybe it won't work - however I just wanted to chime in to say that if it could work, it would be amazing for progressive enhancement as well, since it would work even without js loaded

@TGlide
Copy link
Member

TGlide commented May 4, 2023

I understand your concerns @TGlide, maybe it won't work - however I just wanted to chime in to say that if it could work, it would be amazing for progressive enhancement as well, since it would work even without js loaded

I agree with the benefits. I'd really like to address progressive enhancement at some point, per issue #103. I'm a big defender of progressive enhancement, and try to apply it whenever I can, but it's a bit tough with a library like Radix. Nonetheless, it'd be nice to have a discussion around it, at least.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants