Skip to content

Commit

Permalink
Make toast components screen reader friendly (#5930)
Browse files Browse the repository at this point in the history
* add role=status and aria-live=assertive to toast announcement

* role=alert not role=status for this sort of ux

* changeset
  • Loading branch information
gwyneplaine committed Jun 18, 2021
1 parent eab130f commit 40a44d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/seven-shoes-call.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-ui/toast': patch
---

Added role="alert" to Toast container element for better screen reader experience.
1 change: 1 addition & 0 deletions design-system/packages/toast/src/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ const ToastContainer = (props: HTMLAttributes<HTMLDivElement>) => {
return (
<Portal>
<div
role="alert"
css={{
position: 'fixed',
right: spacing.medium,
Expand Down

1 comment on commit 40a44d2

@vercel
Copy link

@vercel vercel bot commented on 40a44d2 Jun 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.