Skip to content
This repository was archived by the owner on Sep 30, 2025. It is now read-only.
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/seven-oranges-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': minor
---

Updated the Toast component to support multiple re-renders being announced on screen readers
1 change: 1 addition & 0 deletions polaris-react/src/components/Frame/Frame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ class FrameInner extends PureComponent<CombinedProps, State> {
logo,
showToast: this.showToast,
hideToast: this.hideToast,
toastMessages,
startLoading: this.startLoading,
stopLoading: this.stopLoading,
setContextualSaveBar: this.setContextualSaveBar,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export function Toast({
const className = classNames(styles.Toast, error && styles.error);

return (
<div className={className}>
<div className={className} aria-live="assertive">
<KeypressListener keyCode={Key.Escape} handler={onDismiss} />
{leadingIconMarkup}
<HorizontalStack gap="4" blockAlign="center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const ToastManager = memo(function ToastManager({
});

return (
<Portal>
<Portal idPrefix="toast">
<EventListener event="resize" handler={updateToasts} />
<div className={styles.ToastManager} aria-live="assertive">
<TransitionGroup component={null}>{toastsMarkup}</TransitionGroup>
Expand Down
Loading