t4t5 / sweetalert

A beautiful replacement for JavaScript's "alert"
https://sweetalert.js.org
MIT License
22.4k stars 2.84k forks source link

Alert not compatible with assistive technologies #640

Open RinkAttendant6 opened 7 years ago

RinkAttendant6 commented 7 years ago

The alert contents aren't being read out to screen readers upon being displayed. Tested with ChromeVox and Narrator on Windows (don't have a copy of JAWS installed to test at the moment).

The dialog already traps user focus and allows for standard keyboard navigation, which is a good thing. At the very least the alertdialog role needs to be added to the generated HTML of the alert, along with an aria-describedby attribute pointing at the element that contains the message inside the dialog.

References:

germanocorrea commented 7 years ago

It shouldn't be hard to developers make Sweet Alert accessible. Just some aria and javascript, and it's done. This is the main reason why I don't want to use this while developing.