Skip to content

Commit 8a7cdcb

Browse files
committed
fix(Accordion): use the hidden attribute
The edge compatibility issue is standard edge behaviour that's quickly fixed with user css, provided compat in our example
1 parent 0a1716d commit 8a7cdcb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/css/fancy-example.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
transform: rotate(45deg);
4343
}
4444

45-
.accordion *[data-hidden] {
45+
[hidden] {
4646
display: none;
4747
}
4848

src/helpers/AccordionStore.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export interface InjectedPanelAttributes {
55
'aria-hidden': boolean | undefined;
66
'aria-labelledby': string;
77
id: string;
8-
'data-hidden': boolean | undefined;
8+
hidden: boolean | undefined;
99
}
1010

1111
export interface InjectedHeadingAttributes {
@@ -92,7 +92,7 @@ export default class AccordionStore {
9292
'aria-hidden': this.allowMultipleExpanded ? !expanded : undefined,
9393
'aria-labelledby': this.getButtonId(uuid),
9494
id: this.getPanelId(uuid),
95-
'data-hidden': expanded ? undefined : true,
95+
hidden: expanded ? undefined : true,
9696
};
9797
};
9898

0 commit comments

Comments
 (0)