diff --git a/src/css/fancy-example.css b/src/css/fancy-example.css index 89dd9874..dd75d55a 100644 --- a/src/css/fancy-example.css +++ b/src/css/fancy-example.css @@ -42,7 +42,7 @@ transform: rotate(45deg); } -.accordion *[data-hidden] { +[hidden] { display: none; } diff --git a/src/helpers/AccordionStore.ts b/src/helpers/AccordionStore.ts index 6c9fb576..5fb17837 100644 --- a/src/helpers/AccordionStore.ts +++ b/src/helpers/AccordionStore.ts @@ -5,7 +5,7 @@ export interface InjectedPanelAttributes { 'aria-hidden': boolean | undefined; 'aria-labelledby': string; id: string; - 'data-hidden': boolean | undefined; + hidden: boolean | undefined; } export interface InjectedHeadingAttributes { @@ -92,7 +92,7 @@ export default class AccordionStore { 'aria-hidden': this.allowMultipleExpanded ? !expanded : undefined, 'aria-labelledby': this.getButtonId(uuid), id: this.getPanelId(uuid), - 'data-hidden': expanded ? undefined : true, + hidden: expanded ? undefined : true, }; };