Loading...
function onSave() {
document.ariaNotify('Saved');
}function announce(msg) {
if ('ariaNotify' in document) {
document.ariaNotify(msg);
} else {
liveRegion.textContent = msg;
}
}Feature-detect ariaNotify and fall back to a live region where it is not supported.
ariaNotify exists before calling it and falls back to a live region.ariaNotify() need an element in the DOM?No. You can call it on document or any element, without an existing live region.
ariaNotify()?Not yet. Support is limited, so keep a live region fallback.