Skip to content

Commit d09a611

Browse files
authored
Feature/UI ds 453 improve close button aria labels on Alert (#454)
* Improves ARIA labels on Alert close button * Updates snapshots
1 parent a972dfa commit d09a611

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

spec/__snapshots__/Storyshots.test.js.snap

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ exports[`Storyshots Design System/Alert With Call To Action 1`] = `
512512
className="Alert__close"
513513
>
514514
<button
515-
aria-label="close"
515+
aria-label="close success"
516516
className="close"
517517
onClick={[Function]}
518518
type="button"
@@ -641,7 +641,7 @@ exports[`Storyshots Design System/Alert With Call To Action 1`] = `
641641
className="Alert__close"
642642
>
643643
<button
644-
aria-label="close"
644+
aria-label="close info"
645645
className="close"
646646
onClick={[Function]}
647647
type="button"
@@ -734,7 +734,7 @@ exports[`Storyshots Design System/Alert With Call To Action 1`] = `
734734
className="Alert__close"
735735
>
736736
<button
737-
aria-label="close"
737+
aria-label="close announcement"
738738
className="close"
739739
onClick={[Function]}
740740
type="button"
@@ -827,7 +827,7 @@ exports[`Storyshots Design System/Alert With Call To Action 1`] = `
827827
className="Alert__close"
828828
>
829829
<button
830-
aria-label="close"
830+
aria-label="close error"
831831
className="close"
832832
onClick={[Function]}
833833
type="button"
@@ -920,7 +920,7 @@ exports[`Storyshots Design System/Alert With Call To Action 1`] = `
920920
className="Alert__close"
921921
>
922922
<button
923-
aria-label="close"
923+
aria-label="close warning"
924924
className="close"
925925
onClick={[Function]}
926926
type="button"
@@ -1052,7 +1052,7 @@ exports[`Storyshots Design System/Alert With Call To Action 1`] = `
10521052
className="Alert__close"
10531053
>
10541054
<button
1055-
aria-label="close"
1055+
aria-label="close announcement"
10561056
className="close"
10571057
onClick={[Function]}
10581058
type="button"
@@ -1187,7 +1187,7 @@ exports[`Storyshots Design System/Alert With Call To Action 1`] = `
11871187
className="Alert__close"
11881188
>
11891189
<button
1190-
aria-label="close"
1190+
aria-label="close announcement"
11911191
className="close"
11921192
onClick={[Function]}
11931193
type="button"
@@ -1316,7 +1316,7 @@ exports[`Storyshots Design System/Alert With Dismiss 1`] = `
13161316
className="Alert__close"
13171317
>
13181318
<button
1319-
aria-label="close"
1319+
aria-label="close success"
13201320
className="close"
13211321
onClick={[Function]}
13221322
type="button"

src/Alert/Alert.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function Alert(props) {
107107
props.onDismiss && (
108108
<div className="Alert__close">
109109
<button
110-
aria-label="close"
110+
aria-label={`close ${props.type}`}
111111
className="close"
112112
type="button"
113113
onClick={() => props.onDismiss(props.id)}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Array [
9090
className="Alert__close"
9191
>
9292
<button
93-
aria-label="close"
93+
aria-label="close success"
9494
className="close"
9595
onClick={[Function]}
9696
type="button"

0 commit comments

Comments
 (0)