Problem/Motivation
The radix accordion component creates duplicate HTML ids, because the id from the accordion is also used for each button inside the accordion (because the id is inherited via twig).
Steps to reproduce
- Add a accordion component
- Inspect the generated html looking for the accordion id and the id of the buttons inside the accordion
- Note that the buttons have the same id than the accordion itself
Proposed resolution
Avoid creating a button id by explicitly providing an empty id to the buttons inside the accordion
Bootstrap does not use an id on the button in its examples: https://getbootstrap.com/docs/5.3/components/accordion/#example
Otherwise one could also given an unique id to the buttons, like this:
id: 'button-' ~ id ~ '-' ~ loop.index
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork radix-3573814
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
stefan.kornComment #6
doxigo commentedGreat fix Stefan, merged