Open prymalsrealm opened 4 years ago
Not the most elegant solution, but I needed this and this is what I came up with. Adjust 1023px
to your needs.
if (window.matchMedia('(max-width: 1023px)').matches) {
document.querySelectorAll('.js-accordeon-trigger[aria-expanded="true"]').forEach((el) => {
el.click();
});
}
Hi! I just released a fix that should solve this. The tabs now always start expanded regardless of the data-start-collapsed option. https://github.com/matthiasott/a11y-accordion-tabs/releases/tag/v1.0.2 Please also note that there was a (tiny) breaking change in v1.0.0: The component now uses the correct spelling of accordion… ;) Also see: https://github.com/matthiasott/a11y-accordion-tabs/commit/f44bb27e2adda00e3ed72058472a1378bdd3fc05
Can there be separate collapsible options for the tabs vs accordions? I would like the tabs to always start expanded and the accordion to start collapsed. I only see a global startCollapsed property. Thanks!