Skip to content

Commit 6e20760

Browse files
authored
Merge pull request #273 from springload/fix/render-issues
fix(Accordion): use the hidden attribute
2 parents 0a1716d + a7dd9c9 commit 6e20760

File tree

4 files changed

+4
-16
lines changed

4 files changed

+4
-16
lines changed

integration/__snapshots__/wai-aria.spec.js.snap

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,14 @@ Object {
77
"name": "Heading One",
88
"role": "button",
99
},
10-
Object {
11-
"name": "Sunt in reprehenderit cillum ex proident qui culpa fugiat pariatur aliqua nostrud consequat consequat enim quis sit consectetur ad aute ea ex eiusmod id esse culpa et pariatur ad amet pariatur pariatur dolor quis.",
12-
"role": "text",
13-
},
1410
Object {
1511
"name": "Heading Two",
1612
"role": "button",
1713
},
18-
Object {
19-
"name": "Velit tempor dolore commodo voluptate id do nulla do ut proident cillum ad cillum voluptate deserunt fugiat ut sed cupidatat ut consectetur consequat incididunt sed in culpa do labore ea incididunt ea in eiusmod.",
20-
"role": "text",
21-
},
2214
Object {
2315
"name": "Heading Three",
2416
"role": "button",
2517
},
26-
Object {
27-
"name": "Lorem ipsum esse occaecat voluptate duis incididunt amet eiusmod sunt commodo sunt enim anim ea culpa ut tempor dolore fugiat exercitation aliquip commodo dolore elit esse est ullamco velit et deserunt.",
28-
"role": "text",
29-
},
3018
],
3119
"name": "React Accessible Accordion - Integration Test Sandbox",
3220
"role": "WebArea",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-accessible-accordion",
3-
"version": "3.1.0",
3+
"version": "3.1.1",
44
"description": "Accessible Accordion component for React",
55
"main": "dist/umd/index.js",
66
"module": "dist/es/index.js",

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)