The Siren Song of ariaNotify()

Chris Coyier Chris Coyier on

Mat Marquis details the good-and-dangerous of a new method which we can just make a screenreader say something.

There’s a brand new ariaNotify() method — defined by the Accessible Rich Internet Applications (WAI-ARIA) 1.3 Specification — that provides you with a means of programmatically triggering narration in a screen reader. It accepts a string as its first argument, and an optional configuration object as its second:

document.ariaNotify("Hello, World.");Code language: JavaScript (javascript)

In the past, exotic tangos with aria-live were required. The dangerous part is that, in becoming too easy, it will do more harm than good, like an alert("Click here to open the navigation."); So like Mat Says:

So just be cool about this, okay? Okay.

Wanna learn Accessibility deeply?

Leave a Reply

Your email address will not be published. Required fields are marked *

$966,000

Master.dev donates to open source projects through thanks.dev and Open Collective, as well as donates to non-profits like The Last Mile, Annie Canons, and Vets Who Code.