From 710a9d6f56f9e25af84578d10e02bec4ae773e8c Mon Sep 17 00:00:00 2001 From: Julien Wajsberg Date: Tue, 6 Aug 2024 22:38:00 +0200 Subject: [PATCH] Use a different aria-describedBy target for each notification --- src/ui/MaterialDesignContent/MaterialDesignContent.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/MaterialDesignContent/MaterialDesignContent.tsx b/src/ui/MaterialDesignContent/MaterialDesignContent.tsx index cd8139f..e09e9d8 100644 --- a/src/ui/MaterialDesignContent/MaterialDesignContent.tsx +++ b/src/ui/MaterialDesignContent/MaterialDesignContent.tsx @@ -49,7 +49,7 @@ const classes = makeStyles({ }, }); -const ariaDescribedby = 'notistack-snackbar'; +const ariaDescribedbyPrefix = 'notistack-snackbar'; const MaterialDesignContent = forwardRef((props, forwardedRef) => { const { @@ -70,6 +70,8 @@ const MaterialDesignContent = forwardRef((pr action = action(id); } + const ariaDescribedby = `${ariaDescribedbyPrefix}-${id}`; + return (