Closed (fixed)
Project:
Prototype
Version:
5.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Apr 2026 at 14:18 UTC
Updated:
12 May 2026 at 21:10 UTC
Jump to comment: Most recent
The accordion component does not open or close after theme generation.The accordion.scss uses .is-open to show the content panel, but accordion.js calls A11yAccordion without expandedClass, so the library defaults to toggling .is-expanded a class the CSS never responds to.
Pass expandedClass: 'is-open' to sync the JS with the SCSS
new A11yAccordion(accordion, {
triggerSelector: '.c-accordion__trigger[aria-controls]',
- contentSelector: '.c-accordion__content',
+ contentSelector: '.c-accordion__content',
+ expandedClass: 'is-open',
});
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
grgcrlsn321 commentedSimple fix! Needs review.
Comment #4
grgcrlsn321 commentedComment #5
grgcrlsn321 commentedSimilar to accordion tab-content.js is missing expandedClass: 'expanded' from the tab-content.scss. You can test it the same way by generating theme and creating tab content in the paragraphs. I've added the fix for tab-content along with accordion.
Comment #7
jldust commentedThis has been merged in and will be included in the next tagged release.