diff --git a/src/components/ToastContainer.tsx b/src/components/ToastContainer.tsx index b4984357..1df1d893 100644 --- a/src/components/ToastContainer.tsx +++ b/src/components/ToastContainer.tsx @@ -122,9 +122,6 @@ export function ToastContainer(props: ToastContainerProps) { } }} onMouseLeave={collapseAll} - aria-live="polite" - aria-atomic="false" - aria-relevant="additions text" aria-label={containerProps['aria-label']} > {getToastToRender((position, toastList) => { diff --git a/src/tests.cy.tsx b/src/tests.cy.tsx index 39925fd5..576740a4 100644 --- a/src/tests.cy.tsx +++ b/src/tests.cy.tsx @@ -62,3 +62,11 @@ it('focus notification when alt+t is pressed', () => { cy.get('body').type('{alt+t}'); cy.focused().should('have.attr', 'role', 'alert').and('have.attr', 'aria-label', 'notification'); }); + +it('does not nest toast live regions', () => { + cy.mount(); + + toast('hello'); + + cy.findByRole('alert').parents('[aria-live]').should('not.exist'); +});