Conversation
…out by screen readers
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/timo/react-hot-toast/BUgTPnWTwMHZu2k2GfbDPy9P9Von |
|
Can we get this merged? |
|
Hey! Thanks for this PR. I'm wondering how this impacts the per-toast API: react-hot-toast/src/core/toast.ts Line 27 in d1456c4 Will this overwrite this behaviour? |
I think so. If you wanted to keep the per-toast option, you'd probably need to render a toast container for each required politeness level and render toasts into the appropriate one as needed. |
Fantastic library, thank you very much for building it!
I noticed whilst testing with NVDA that the toasts were not being spoken by the screen reader. I believe this is because aria-live regions need to be in the DOM on page load.
This PR adds the aria-live="polite" attribute to the Toaster component which seems to resolve the issue with NVDA.