Providing names to accordion items to protect deeplinking

I know that it’s already possible to link to an Item in an Accordion by giving a name to the accordion and then using the number of the item, starting with 0 (since it behaves like an array).

But would it be possible for the DEV team to add the ability to also “name” individual items, so that I could use a deeplink that remains the same over time, IF I was to add additional items and/or change the order of items in the accordion?

If you don’t plan or have no intention of adding this feature, could you provide me with pointers on how one could implement this functionality, by customizing the current Accordion module?

It may be possible to do it with custom code by using data attributes.

Perhaps this ⇦ might be a starting point

Thanks for the suggestion, that’s a good find, hadn’t seen this.

But… since the client will have dozens of accordions, which he will be adding often to the site over time, I don’t think this programmatic approach will scale :frowning:

We’ve already customized modules before, and I think adding a CSS ID field to each item will probably be easier in the long run for the client… at least, that’s the approach I think we’ll look into, as BB (Simon) has confirmed this is not something they’ll be looking to add in the plugin, at this point