Accordion Example
accordion Content example
The issue in a nutshell: We’d like to let users manage accordions in a flexible way, letting them reorder items, create new ones, etc.. The current version has preset values for id, aria-controls, and aria-labelled-by that make it accessible; if we let users create new items, they won’t be able to easily assign unique values to those attributes.
We’d like to add those values to the <button> and content <div> for each accordion item on page load with JS.
Here’s our accordion build, without those preset values; it works great, but presumably needs id, aria-controls, and aria-labelled-by for accessibility.
Update: This works great now. 🙂