Add ID to Accordion Heading

Friday, November 17, 2023
The Accordion snippet with the new Header ID field

The Accordion snippet has been updated to support adding an ID to the accordion's top-level heading. This would typically be used to allow linking to the accordion with a URL fragment (e.g. #accordion). If no text is provided in the Header field, the Header ID field will be ignored.

Actions Required

Existing Accordion snippets will continue to work without change.

If you want to assign an ID to the top-level heading of an existing accordion, you will either have to:

  • copy the contents of the accordion over to a new instance of the snippet, or
  • modify the source code to add the Header ID field to the instance of the snippet on the page.
Categorized As