Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/warm-groups-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@leafygreen-ui/toast': patch
---

Updates the Toast Icon to be labeled for screen readers
10 changes: 5 additions & 5 deletions packages/toast/src/InternalToast/InternalToast.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ describe('packages/toast/internal-toast', () => {

describe('the correct icon is rendered', () => {
const expectedVariantIcons: Record<Variant, string> = {
[Variant.Success]: 'Checkmark With Circle Icon',
[Variant.Note]: 'Info With Circle Icon',
[Variant.Warning]: 'Warning Icon',
[Variant.Important]: 'Important With Circle Icon',
[Variant.Progress]: 'Refresh Icon',
[Variant.Success]: 'success notification',
[Variant.Note]: 'note notification',
[Variant.Warning]: 'warning notification',
[Variant.Important]: 'important notification',
[Variant.Progress]: 'progress notification',
};

test.each(Object.values(Variant) as Array<Variant>)(
Expand Down
3 changes: 2 additions & 1 deletion packages/toast/src/InternalToast/InternalToast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ export const InternalToast = React.forwardRef<
})}
>
<VariantIcon
aria-hidden
role="img"
aria-label={`${variant} notification`}
className={cx(baseIconStyle, iconThemeStyle[theme])}
size={32}
/>
Expand Down
Loading