Skip to content
This repository was archived by the owner on May 4, 2019. It is now read-only.

Commit

Permalink
fix(button): updates aria role for acessibility updates storyshots
Browse files Browse the repository at this point in the history
  • Loading branch information
bmikkelsen22 committed Jan 24, 2019
1 parent d683ded commit 2efa4db
Show file tree
Hide file tree
Showing 7 changed files with 251 additions and 176 deletions.
259 changes: 139 additions & 120 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/Button/BtnGroupOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export const BtnGroupOption: React.SFC<BtnGroupOptionProps> = props => {
return (
<button
className={`btn btn-primary ${className}`}
role="button"
role="switch"
aria-checked={props.selected}
disabled={props.disabled}
onClick={props.onClick}
aria-label={ariaLabel}
Expand Down
72 changes: 48 additions & 24 deletions src/Filter/__tests__/__snapshots__/CombinedFilter.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -582,11 +582,12 @@ exports[`FilterContainer renders 1`] = `
selected={true}
>
<button
aria-checked={true}
aria-label="Select All TechType"
className="btn btn-primary active"
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
All
</button>
Expand All @@ -602,11 +603,12 @@ exports[`FilterContainer renders 1`] = `
selected={false}
>
<button
aria-checked={false}
aria-label="tech2"
className="btn btn-primary "
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
tech2
</button>
Expand All @@ -619,11 +621,12 @@ exports[`FilterContainer renders 1`] = `
selected={false}
>
<button
aria-checked={false}
aria-label="tech1"
className="btn btn-primary "
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
tech1
</button>
Expand Down Expand Up @@ -1480,11 +1483,12 @@ exports[`FilterContainer toggles the advanced filter 1`] = `
selected={true}
>
<button
aria-checked={true}
aria-label="Select All TechType"
className="btn btn-primary active"
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
All
</button>
Expand All @@ -1500,11 +1504,12 @@ exports[`FilterContainer toggles the advanced filter 1`] = `
selected={false}
>
<button
aria-checked={false}
aria-label="tech2"
className="btn btn-primary "
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
tech2
</button>
Expand All @@ -1517,11 +1522,12 @@ exports[`FilterContainer toggles the advanced filter 1`] = `
selected={false}
>
<button
aria-checked={false}
aria-label="tech1"
className="btn btn-primary "
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
tech1
</button>
Expand Down Expand Up @@ -2378,11 +2384,12 @@ exports[`FilterContainer toggles the advanced filter 2`] = `
selected={true}
>
<button
aria-checked={true}
aria-label="Select All TechType"
className="btn btn-primary active"
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
All
</button>
Expand All @@ -2398,11 +2405,12 @@ exports[`FilterContainer toggles the advanced filter 2`] = `
selected={false}
>
<button
aria-checked={false}
aria-label="tech2"
className="btn btn-primary "
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
tech2
</button>
Expand All @@ -2415,11 +2423,12 @@ exports[`FilterContainer toggles the advanced filter 2`] = `
selected={false}
>
<button
aria-checked={false}
aria-label="tech1"
className="btn btn-primary "
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
tech1
</button>
Expand Down Expand Up @@ -2749,11 +2758,12 @@ exports[`FilterContainer toggles the advanced filter 2`] = `
selected={true}
>
<button
aria-checked={true}
aria-label="Select All Grade"
className="btn btn-primary active"
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
All
</button>
Expand All @@ -2769,11 +2779,12 @@ exports[`FilterContainer toggles the advanced filter 2`] = `
selected={false}
>
<button
aria-checked={false}
aria-label="Grades 3-5"
className="btn btn-primary "
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
Grades 3-5
</button>
Expand All @@ -2786,11 +2797,12 @@ exports[`FilterContainer toggles the advanced filter 2`] = `
selected={false}
>
<button
aria-checked={false}
aria-label="Grades 6-8"
className="btn btn-primary "
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
Grades 6-8
</button>
Expand All @@ -2803,11 +2815,12 @@ exports[`FilterContainer toggles the advanced filter 2`] = `
selected={false}
>
<button
aria-checked={false}
aria-label="High School"
className="btn btn-primary "
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
High School
</button>
Expand Down Expand Up @@ -2915,11 +2928,12 @@ exports[`FilterContainer toggles the advanced filter 2`] = `
selected={false}
>
<button
aria-checked={false}
aria-label="English Literacy & Arts"
className="btn btn-primary "
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
English Literacy & Arts
</button>
Expand All @@ -2932,11 +2946,12 @@ exports[`FilterContainer toggles the advanced filter 2`] = `
selected={false}
>
<button
aria-checked={false}
aria-label="Maths"
className="btn btn-primary "
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
Maths
</button>
Expand Down Expand Up @@ -3093,11 +3108,12 @@ exports[`FilterContainer toggles the advanced filter 2`] = `
selected={true}
>
<button
aria-checked={true}
aria-label="Select All Multi All"
className="btn btn-primary active"
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
All
</button>
Expand All @@ -3113,11 +3129,12 @@ exports[`FilterContainer toggles the advanced filter 2`] = `
selected={false}
>
<button
aria-checked={false}
aria-label="US History"
className="btn btn-primary "
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
US History
</button>
Expand All @@ -3130,11 +3147,12 @@ exports[`FilterContainer toggles the advanced filter 2`] = `
selected={false}
>
<button
aria-checked={false}
aria-label="World History"
className="btn btn-primary "
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
World History
</button>
Expand Down Expand Up @@ -3239,11 +3257,12 @@ exports[`FilterContainer toggles the advanced filter 2`] = `
selected={true}
>
<button
aria-checked={true}
aria-label="Select All Multi All Disabled"
className="btn btn-primary active"
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
All
</button>
Expand All @@ -3259,11 +3278,12 @@ exports[`FilterContainer toggles the advanced filter 2`] = `
selected={false}
>
<button
aria-checked={false}
aria-label="Calculus"
className="btn btn-primary "
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
Calculus
</button>
Expand All @@ -3276,11 +3296,12 @@ exports[`FilterContainer toggles the advanced filter 2`] = `
selected={false}
>
<button
aria-checked={false}
aria-label="Geometry"
className="btn btn-primary "
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
Geometry
</button>
Expand Down Expand Up @@ -4114,11 +4135,12 @@ exports[`FilterContainer toggles the advanced filter 3`] = `
selected={true}
>
<button
aria-checked={true}
aria-label="Select All TechType"
className="btn btn-primary active"
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
All
</button>
Expand All @@ -4134,11 +4156,12 @@ exports[`FilterContainer toggles the advanced filter 3`] = `
selected={false}
>
<button
aria-checked={false}
aria-label="tech2"
className="btn btn-primary "
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
tech2
</button>
Expand All @@ -4151,11 +4174,12 @@ exports[`FilterContainer toggles the advanced filter 3`] = `
selected={false}
>
<button
aria-checked={false}
aria-label="tech1"
className="btn btn-primary "
disabled={false}
onClick={[Function]}
role="button"
role="switch"
>
tech1
</button>
Expand Down
Loading

0 comments on commit 2efa4db

Please sign in to comment.