Accordion title default wrapper - configurable?

Created on 3 November 2022, about 2 years ago
Updated 30 May 2023, over 1 year ago

Problem/Motivation

When creating accordions the default wrapper for the accordion title is an H2. Some sites might prefer a different default. For example the USWDS examples use H4: https://designsystem.digital.gov/components/accordion/

Steps to reproduce

Create an accordion and inspect the markup.

Proposed resolution

I'm open to ideas on whether this needs doing and what would be a good solution. Possibilities include:

  1. Have a Drupal config option for choosing the wrapper for the title
  2. Use Twig templates in some way, which could be overridden (not sure if that's technically feasible)
  3. Switch it from H2 to H4, to at least be closer to the USWDS examples

Remaining tasks

Discuss and get feedback on next steps.

User interface changes

TBD

API changes

TBD

Data model changes

TBD

✨ Feature request
Status

Fixed

Version

2.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States brockfanning

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024