Replies: 9 comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
-
Another nice-to-have is to change the behaviour of the accordion by an attribute if only one or multiple children may be open at the same time. I could use the Is it possible to write a custom Shoelace component to fool around? I'm not confident right now to fork and change Shoelace directly. I assume besides Lit underneath Shoelace comes with more helpers to build new components. |
Beta Was this translation helpful? Give feedback.
-
There are even examples for details/collapsible/expandable that use a proper header with a level WRAPPING the button. I am not sure if aria-level works directly on a This is more in the lines of how I'd change the HTML:
The new HTML structure is probably a breaking change. So perhaps the wrapping should only be done in the new way if a level is set. FAST lets use set the level as I have suggested. Lion lets you set the wrapper element for the button with the slot. There is no additional wrapper like I think I can come up with a code for a "plain" accordion web component. But I have no idea what a controller in React terms that you say is needed for React. |
Beta Was this translation helpful? Give feedback.
-
That's a fair ask for an accordion. While details and accordions are similar, they're semantically different and may not be interchangeable in all cases. As it stands, the Shoelace When we start work on an accordion, we'll be sure to review the [Aria APG](ARIA Authoring Practices Guide (APG)) to make sure it's accessible to as many assistive devices as possible. |
Beta Was this translation helpful? Give feedback.
-
I think I can create code on the basis of existing components. But I need guidance for the React conroller as I have no React experience at all. |
Beta Was this translation helpful? Give feedback.
-
The accordion will be two components: a "controller" called |
Beta Was this translation helpful? Give feedback.
-
Great. Let me know if you want help. Can give it a try next week. |
Beta Was this translation helpful? Give feedback.
-
An accordion component, much like what
<sl-details>
provides in this example, but with a controller to make the experience more idiomatic for React and other users.See also: #1000
Please vote for this feature using 👍 and 👎
Beta Was this translation helpful? Give feedback.
All reactions