Skip to content

Commit

Permalink
fix(Accordion): use the hidden attribute
Browse files Browse the repository at this point in the history
The edge compatibility issue is standard edge behaviour that's quickly
fixed with user css, provided compat in our example
  • Loading branch information
synecdokey committed Jul 2, 2020
1 parent 0a1716d commit 8a7cdcb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/css/fancy-example.css
Expand Up @@ -42,7 +42,7 @@
transform: rotate(45deg);
}

.accordion *[data-hidden] {
[hidden] {
display: none;
}

Expand Down
4 changes: 2 additions & 2 deletions src/helpers/AccordionStore.ts
Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
};
};

Expand Down

0 comments on commit 8a7cdcb

Please sign in to comment.