Skip to content

Commit fe53e3b

Browse files
author
Andy Hook
authored
Announce toast as status rather than group (#1556)
1 parent abe4a62 commit fe53e3b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.yarn/versions/baedf443.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
releases:
2+
"@radix-ui/react-toast": patch
3+
4+
declined:
5+
- primitives

packages/react/toast/src/Toast.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,10 @@ const ToastImpl = React.forwardRef<ToastImplElement, ToastImplProps>(
547547
})}
548548
>
549549
<Primitive.li
550+
// Ensure toasts are announced as status list or status when focused
551+
role="status"
552+
aria-live="off"
553+
aria-atomic
550554
tabIndex={0}
551555
data-state={open ? 'open' : 'closed'}
552556
data-swipe-direction={context.swipeDirection}

0 commit comments

Comments
 (0)