marcelodolza / iziToast

Elegant, responsive, flexible and lightweight notification plugin with no dependencies.

Home Page:http://izitoast.marcelodolza.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Accessibility Support

crawlings-trivir opened this issue · 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!

+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.

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