demo · v141
Queue vs Interrupt
The spec gives each node its own announcement queue, with a per-call option to either join the back of the queue or pre-empt whatever is currently speaking. Three scenarios from the explainer: secondary auto-fill (low priority), upload delay (auto), critical error (interrupt true). Fire them out of order and watch the queue rearrange.
chrome://flags/#enable-experimental-web-platform-features if needed.
Secondary auto-fill
Spreadsheet finished a background autofill. Useful but not urgent — queue it behind anything already pending.
Send is taking longer than usual
Email send hasn't completed in the expected window. Normal priority, queued.
Connection lost — interrupt
The doc went offline mid-edit. Cut in line and pre-empt anything speaking right now.
the call
// auto-fill announcement — low priority, queue behind anything pending
document.body.ariaNotify(
"autofilled values in cells A2 through A20",
{ priority: "none", interrupt: false },
);
// urgent — cut in line, pre-empt the current utterance
document.body.ariaNotify(
"connection lost — your last edit is unsaved",
{ priority: "important", interrupt: true },
);
why this angle
The Microsoft Edge explainer lists "secondary actions" and "failed or delayed actions" alongside their priority recommendations. A single live region cannot model both — every message goes to the same queue at the same priority, in DOM order. ariaNotify's per-call priority and interrupt options let an autofill confirmation politely queue while a connection-lost error pre-empts everything. This page lines the three side by side so you can fire them in any combination and feel the difference.