-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessibility #335
Comments
I can confirm that despite this library saying it's accessible, it is not. NVDA on Chrome / Firefox |
Hey, thanks for sharing. Do you have any suggestions on why this may be the case or what's missing? The related ARIA props appear to be set correctly. |
Here is what NVDA reports when clicking the buttons on the https://react-hot-toast.com/ page:
I have not looked at the implementation, nor the example page code, but I assume from your aria comment you are trying to rely on Related NVDA ticket (wontfix): nvaccess/nvda#14591 I think this is what's happening as the Promise and Make Toast one first show a spinner / temporary content, and then announce the new content. If you want this to work, you need to mount the status message first, and then fill it with content on a next tick, or, have a single status on the page that is empty on document load, and changes based on the current toast/toasts. That said, making a toast dissappear before its contents are announced effectively makes it inaccessible again, which is, among other reasons, why doing accessible toasts is considered hard and snackbars are not much better. Personally I don't think it's wise to claim this is accessible, but allowing aria props is better than nothing. Next, if you want to make it less bad, you probably want to ensure messages are announced properly. |
Hello! Thank you for this awesome library. Some of my users reached out to me indicating that their screen-reader NVDA does not detect the react-hot-toast popups. I am not able to reproduce myself as I use Linux, just wanted to let you know.
The text was updated successfully, but these errors were encountered: