Skip to content

Commit e6154a7

Browse files
authored
adds accessible close button to Alert (#386)
1 parent 684d96d commit e6154a7

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

spec/__snapshots__/Storyshots.test.js.snap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ exports[`Storyshots Design System/Alert With Call To Action 1`] = `
290290
className="Alert__close"
291291
>
292292
<button
293+
aria-label="close"
293294
className="close"
294295
onClick={[Function]}
295296
type="button"
@@ -363,6 +364,7 @@ exports[`Storyshots Design System/Alert With Call To Action 1`] = `
363364
className="Alert__close"
364365
>
365366
<button
367+
aria-label="close"
366368
className="close"
367369
onClick={[Function]}
368370
type="button"
@@ -436,6 +438,7 @@ exports[`Storyshots Design System/Alert With Call To Action 1`] = `
436438
className="Alert__close"
437439
>
438440
<button
441+
aria-label="close"
439442
className="close"
440443
onClick={[Function]}
441444
type="button"
@@ -509,6 +512,7 @@ exports[`Storyshots Design System/Alert With Call To Action 1`] = `
509512
className="Alert__close"
510513
>
511514
<button
515+
aria-label="close"
512516
className="close"
513517
onClick={[Function]}
514518
type="button"
@@ -582,6 +586,7 @@ exports[`Storyshots Design System/Alert With Call To Action 1`] = `
582586
className="Alert__close"
583587
>
584588
<button
589+
aria-label="close"
585590
className="close"
586591
onClick={[Function]}
587592
type="button"
@@ -694,6 +699,7 @@ exports[`Storyshots Design System/Alert With Call To Action 1`] = `
694699
className="Alert__close"
695700
>
696701
<button
702+
aria-label="close"
697703
className="close"
698704
onClick={[Function]}
699705
type="button"
@@ -809,6 +815,7 @@ exports[`Storyshots Design System/Alert With Call To Action 1`] = `
809815
className="Alert__close"
810816
>
811817
<button
818+
aria-label="close"
812819
className="close"
813820
onClick={[Function]}
814821
type="button"
@@ -882,6 +889,7 @@ exports[`Storyshots Design System/Alert With Dismiss 1`] = `
882889
className="Alert__close"
883890
>
884891
<button
892+
aria-label="close"
885893
className="close"
886894
onClick={[Function]}
887895
type="button"

src/Alert/Alert.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ function Alert(props) {
9696
props.onDismiss && (
9797
<div className="Alert__close">
9898
<button
99+
aria-label="close"
99100
className="close"
100101
type="button"
101102
onClick={() => props.onDismiss(props.id)}

src/Toast/__snapshots__/withToast.test.jsx.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Array [
3535
className="Alert__close"
3636
>
3737
<button
38+
aria-label="close"
3839
className="close"
3940
onClick={[Function]}
4041
type="button"

0 commit comments

Comments
 (0)