-
-
Notifications
You must be signed in to change notification settings - Fork 700
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
Accessiblity questions #121
Comments
Here's a sandbox with the |
Hello @vaaralav, I really appreciate your feedback, thanks a lot!
This is probably due to the transition like you suggested. Adding accessibility could only make the library better. I will work on it for sure. |
Hey @vaaralav, The library is a bit more accessible :). If you have any remarks please tell me |
Hey @fkhadra, I've been testing this library with accessibility, and I'm still getting the screen-reader saying the message twice (upon entering and exiting the transition). My setup is like so: const transition = cssTransition({
enter: styles.transitionIn,
exit: styles.transitionOut,
duration: [350, 200],
})
const Toast = () => (
<div aria-live="polite">
<ToastContainer
hideProgressBar
position="bottom-center"
className={styles.container}
toastClassName={styles.wrapper}
bodyClassName={styles.body}
autoClose={6000}
transition={transition}
role="alert"
/>
</div>
) |
@timrodz this is quite old now so not sure if it is helpful to you anymore. Adding
|
Thanks for the awesome project! I've been using this in handful of projects and it just works ❤️
Have you considered taking steps to make the notifications more accessible?
Currently the toasts doesn't have
role="alert"
on them by default so at least VoiceOver won't read the notifications. If that attribute is given to the toast content eg.toast(<span role="alert">Wow so easy!</span>)
VoiceOver reads "Wow so easy!" twice when the toast appears and once more when the toast disappears. I believe that has to do withTransition
wrapper, but I'm not sure.Another small thing that could be more accessible is the
DefaultCloseButton
. VoiceOver reads it now as "multiplication symbol, button". If the button was defined like below the button would be read "close, button".The text was updated successfully, but these errors were encountered: