Skip to content

Commit

Permalink
Announce toast as status rather than group (#1556)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Hook authored Jul 22, 2022
1 parent abe4a62 commit fe53e3b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .yarn/versions/baedf443.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
releases:
"@radix-ui/react-toast": patch

declined:
- primitives
4 changes: 4 additions & 0 deletions packages/react/toast/src/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,10 @@ const ToastImpl = React.forwardRef<ToastImplElement, ToastImplProps>(
})}
>
<Primitive.li
// Ensure toasts are announced as status list or status when focused
role="status"
aria-live="off"
aria-atomic
tabIndex={0}
data-state={open ? 'open' : 'closed'}
data-swipe-direction={context.swipeDirection}
Expand Down

0 comments on commit fe53e3b

Please sign in to comment.