iziToast icon indicating copy to clipboard operation
iziToast copied to clipboard

Accessibility Support

Open crawlings-trivir opened this issue 5 years ago • 2 comments

iziToast doesn't appear to support the 'alert' accessibility pattern: https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/alert/index.html

When an iziToast is shown in my web app, I'd like the screen reader to read the contents of the alert automatically. Is there was a way to add the role="alert" attribute to the toast element that is shown? There doesn't seem to be an obvious way to do this with iziToast. Is there an option I'm missing? If not, could you add this support to iziToast?

Thanks!

crawlings-trivir avatar Jan 18 '19 01:01 crawlings-trivir

+1. If the plugin is simply inserting an element into the DOM after page load, then aria live regions won't work. There has to be a container in the DOM on page load that is set to be a live region. Then it's a matter of showing and hiding the content, rather than inserting it into the DOM. Otherwise the change in content won't be announced to the screenreader. There should also be options to set the block as an alert (role="alert"), or with aria-live="polite", aria-live="assertive", as well as options for the aria-atomic attribute.

plweil avatar Feb 13 '20 19:02 plweil

Has this been implemented? The tags indicate that it has, but the issue is still open.

dpmurray21 avatar Dec 08 '21 21:12 dpmurray21