Skip to content

Commit

Permalink
Merge pull request #273 from springload/fix/render-issues
Browse files Browse the repository at this point in the history
fix(Accordion): use the hidden attribute
  • Loading branch information
synecdokey committed Jul 2, 2020
2 parents 0a1716d + a7dd9c9 commit 6e20760
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
12 changes: 0 additions & 12 deletions integration/__snapshots__/wai-aria.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,14 @@ Object {
"name": "Heading One",
"role": "button",
},
Object {
"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.",
"role": "text",
},
Object {
"name": "Heading Two",
"role": "button",
},
Object {
"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.",
"role": "text",
},
Object {
"name": "Heading Three",
"role": "button",
},
Object {
"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.",
"role": "text",
},
],
"name": "React Accessible Accordion - Integration Test Sandbox",
"role": "WebArea",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-accessible-accordion",
"version": "3.1.0",
"version": "3.1.1",
"description": "Accessible Accordion component for React",
"main": "dist/umd/index.js",
"module": "dist/es/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/css/fancy-example.css
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 6e20760

Please sign in to comment.