Add name
property to <sl-details>
#2027
acrobertson
started this conversation in
Ideas
Replies: 1 comment
-
Nice! I wasn't aware of the details:name attribute. One concern I have is that each name will be rendered inside separate shadow roots, so I suspect it won't work the way you're hoping. If that's the case, we'll probably be better off creating a dedicated accordion component where we can mimic the one-open-at-a-time behavior. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Could you please add a
name
property to<sl-details>
that maps to the<details>
element'sname
attribute?The
<sl-details>
element is meant to "[function] the same as<details>
", but it does not provide a way to set the (relatively new)name
attribute, which enables "exclusive accordion" behavior without the need for a grouping parent element and userland JS as in the current Grouping Details example.The
name
attribute currently has support in all major browsers except Firefox, making it a great progressive enhancement opportunity. It can also be polyfilled.Beta Was this translation helpful? Give feedback.
All reactions