demo · v141
Keyboard Confirmations
Two scenarios from the Microsoft Edge explainer: a keyboard shortcut applies a non-visible state change, and the app fires ariaNotify() so screen reader users hear what happened. No DOM mutation, no live region, no hidden tricks.
chrome://flags/#enable-experimental-web-platform-features. Turn on a screen reader to hear the announcements — the JavaScript call always fires regardless.
scenario 1 · glow text command
Select any text in the editor below, then press Shift+Alt+Y. The selected run gains a glow style — and a screen reader hears "selected text glowing blue".
shortcut: Shift+Alt+Y
scenario 2 · set presence
Cycle presence with Ctrl+Shift+P (or use the buttons). Nothing announces itself via the DOM tree — the app pushes the change straight to the accessibility queue.
the calls
// scenario 1 — keyboard action in a rich-text editor
editor.addEventListener("keydown", (e) => {
if (e.shiftKey && e.altKey && e.code === "KeyY") {
applyGlow(window.getSelection());
document.body.ariaNotify?.("selected text glowing blue", {
priority: "auto",
});
e.preventDefault();
}
});
// scenario 2 — presence change with no visible UI on focus
function setPresence(state) {
badge.textContent = state;
document.body.ariaNotify?.(`presence set to ${state.toLowerCase()}`, {
priority: "important",
});
}
why this angle
The Edge explainer cites these two scenarios because they break ARIA live regions in different ways. The glow command makes no DOM change a screen reader could observe — the inline style is invisible to AT. The presence change does have a visible badge, but that badge isn't tied to the keyboard shortcut focus, so a live region wouldn't reliably fire on shortcut press. ariaNotify sidesteps both.