Add support for aria-label/aria-labelledby and role in ToastContainer #730
fabianherrera15
started this conversation in
Ideas
Replies: 2 comments
-
Hey @fabianherrera15 thanks for your feedback appreciate it. I'll consider adding that for the next release |
Beta Was this translation helpful? Give feedback.
0 replies
-
I would LOVE this. It would make testing also a bit easier, as React Testing Library really pushes towards using labels and whatnot (for good reason). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First of all, thank you for this library and the effort put into making it accessible!
I'd like to see support for a
role
attribute that will be added to the ToastContainer element in conjunction with anaria-label
oraria-labelledby
, this will help screen reader users identifying this container as a landmark and facilitate navigation to it.If implemented, the rendered element will look like this in the DOM for example
<div role="complementary" aria-label="notifications" class="Toastify__toast-container">
The current workaround is to wrap the ToastContainer component with a
div
element that contains these attributes but ideally, we shouldn't bloat the DOM with more elements.Beta Was this translation helpful? Give feedback.
All reactions