JavaScript Element ariaNotify() Method

Beginner
⏱️ 12 min read
📚 Updated: Jul 2026
🎯 5 Examples
🚀 5 Try-it labs
Limited availability
Instance method

What You’ll Learn

Element.ariaNotify() is an instance method that queues text for a screen reader to announce. Learn priorities, how it compares to ARIA live regions, feature detection, and five try-it labs. Support is Limited availability (not Baseline yet).

01

Kind

Instance method

02

Announces

Screen reader text

03

Priority

normal / high

04

Returns

undefined

05

vs live

No DOM change needed

06

Status

Limited availability

Introduction

Classic accessible status updates often use an ARIA live region: put aria-live on an element and change its text so assistive tech announces it. That only works when the DOM content changes—and many apps hide extra nodes just to trigger speech.

ariaNotify() lets you request an announcement directly from JavaScript, with a message that can be independent of what is visible on the page. It is part of the WAI-ARIA ARIANotifyMixin (also available on Document).

💡
Beginner tip

You will only hear announcements if a screen reader (or similar AT) is active. Always feature-detect, and keep an aria-live fallback for browsers without the method.

This page is part of JavaScript Element. Related topics include append() and ariaLive.

Understanding the ariaNotify() Method

Calling el.ariaNotify(text) queues text for assistive technology. It does not change the element’s visible content by itself.

  • It is an instance method on Element (and Document).
  • Announcements can happen without a DOM update (unlike live regions).
  • Message text is defined in the method call—independent of node content.
  • Prefer one combined string over several rapid calls.
  • Do not spam: no transient activation is required, so overuse can harm UX.
  • Call on accessibility-relevant elements; browsers may ignore some containers (for example <html> / <body>).

📝 Syntax

General forms of Element.ariaNotify (MDN):

JavaScript
ariaNotify(announcement)
ariaNotify(announcement, options)

Parameters

  • announcement — a string specifying the text to be announced.
  • options (optional) — an object that may include:
    • priority"normal" (default: spoken after the current announcement) or "high" (interrupt and speak immediately).

Return value

None (undefined).

Priority vs live regions (MDN)

  • priority: "high"aria-live="assertive"
  • priority: "normal"aria-live="polite"
  • Existing aria-live announcements still take priority over ariaNotify().

Common patterns

JavaScript
btn.ariaNotify("Saved successfully.");

btn.ariaNotify("Error: try again.", { priority: "high" });

// Prefer one combined message
btn.ariaNotify("Hello there. The time is now 8 o'clock.");

if (typeof el.ariaNotify === "function") {
  el.ariaNotify("Ready");
}

⚡ Quick Reference

GoalCode
Announce textel.ariaNotify("Done")
Urgent interruptel.ariaNotify(msg, { priority: "high" })
Feature-detecttypeof el.ariaNotify === "function"
FallbackUpdate an aria-live region
Language voiceSet lang on el or an ancestor
MDN / BCD statusLimited availability; not Deprecated / Experimental / Non-standard

🔍 At a Glance

Four facts to remember about Element.ariaNotify().

Returns
undefined

Queues speech only

Availability
limited

Not Baseline yet

Needs AT?
yes

Screen reader hears it

DOM change?
not required

Unlike live regions

📋 ariaNotify() vs ARIA live regions

el.ariaNotify(msg)aria-live region
TriggerAny time from JSAfter DOM content changes
Message sourceArgument stringUpdated node text / content
Hidden live node hackNot neededOften used as a workaround
Urgencypriority normal / highpolite / assertive
Browser supportLimited / rolling outWidely available
Best forJS events without DOM text updatesCross-browser status text today

Examples Gallery

Examples follow MDN Element.ariaNotify() patterns. Use a screen reader in supporting browsers to hear announcements. View Output shows what the script does on screen.

📚 Getting Started

MDN-style button announce, plus safe feature detection.

Example 1 — Basic ariaNotify() (MDN)

Click a button to queue a screen reader announcement on itself.

JavaScript
document.querySelector("button").addEventListener("click", () => {
  document.querySelector("button").ariaNotify("You ain't seen me, right?");
});
Try It Yourself

How It Works

The announcement is queued from the button element. Visible UI does not need to change for AT to speak the string (when the API and a screen reader are available).

Example 2 — Feature Detection

Always check the method exists before calling it.

JavaScript
const btn = document.querySelector("button");

if (typeof btn.ariaNotify === "function") {
  btn.ariaNotify("Notification sent.");
  console.log("ariaNotify supported");
} else {
  console.log("ariaNotify not supported — use aria-live fallback");
}
Try It Yourself

How It Works

Limited availability means many browsers still lack the method. Detection avoids TypeError and keeps your UX progressive.

📈 Practical Patterns

High priority, combining messages, and a live-region fallback.

Example 3 — priority: "high"

Interrupt-style announcements for urgent errors (like assertive live regions).

JavaScript
const form = document.getElementById("form");

form.addEventListener("submit", (e) => {
  e.preventDefault();
  if (typeof form.ariaNotify === "function") {
    form.ariaNotify("Error: email is required.", { priority: "high" });
  }
});
Try It Yourself

How It Works

High priority aims to speak immediately. Use sparingly so you do not constantly interrupt the user.

Example 4 — Combine Messages (MDN Advice)

Prefer one string over back-to-back calls.

JavaScript
const status = document.getElementById("status");

// Less reliable across AT:
// status.ariaNotify("Hello there.");
// status.ariaNotify("The time is now 8 o'clock.");

// Better — one announcement
if (typeof status.ariaNotify === "function") {
  status.ariaNotify("Hello there. The time is now 8 o'clock.");
}
Try It Yourself

How It Works

MDN notes that some screen readers may only speak the latest call. Combining keeps the full message together.

Example 5 — Live Region Fallback

Progressive enhancement when ariaNotify is missing.

JavaScript
function announce(el, message) {
  if (typeof el.ariaNotify === "function") {
    el.ariaNotify(message);
    return;
  }
  const live = document.getElementById("live");
  live.textContent = "";
  // Force a change so polite live regions re-announce
  requestAnimationFrame(() => {
    live.textContent = message;
  });
}

announce(document.getElementById("action"), "Item added to cart.");
Try It Yourself

How It Works

Supporting browsers use the modern API; others still get an accessible update through a polite live region.

🚀 Common Use Cases

  • Confirming save / submit / copy actions without changing visible status text.
  • Announcing validation errors with priority: "high".
  • Cart or list updates after a click, independently of the rendered markup string.
  • Replacing hidden live-region “hack” nodes in progressive apps.
  • Teaching the difference between polite/assertive live regions and notify priorities.
  • Pairing with Document.ariaNotify() when a document-level announce is clearer.

🧠 How ariaNotify() Announces

1

Call on a relevant element

Pass announcement text (and optional priority) from an Element in the a11y tree.

Call
2

Browser queues the message

Permissions Policy may block silently; otherwise the string is queued for AT.

Queue
3

Screen reader speaks

Voice/language follows lang on the element or nearest ancestor.

Speak
4

Return undefined

No promise—verify support and test with real assistive tech.

📝 Notes

  • Not Deprecated, Experimental, or Non-standard per MDN BCD (experimental: false, standard_track: true).
  • MDN lists it as Limited availability (not Baseline)—feature-detect always.
  • Chrome may be partial by platform; Safari may not support yet—check current tables.
  • Permissions Policy aria-notify can block announcements silently.
  • Language/voice uses the element’s lang (or nearest ancestor / UA default).
  • Related: ariaLive, append(), JavaScript hub.

Browser Support

Element.ariaNotify() is Limited availability on MDN (not Baseline). Logos use the shared browser-image-sprite.png sprite from this project. Support is rolling out (for example full support in recent Firefox; partial in some Chromium builds). Always feature-detect.

Limited availability · Not Baseline

Element.ariaNotify()

Standard-track accessibility API. Keep an aria-live fallback until Baseline coverage improves.

Limited Not Baseline yet
Mozilla Firefox Supported (from 150+)
Yes
Google Chrome Partial / platform-dependent
Partial
Microsoft Edge Partial (Chromium mirror)
Partial
Opera Partial (Chromium mirror)
Partial
Apple Safari Not supported (check updates)
No
Internet Explorer Not supported
No
ariaNotify() Growing

Bottom line: Use ariaNotify() where supported for JS-driven announcements. Feature-detect and fall back to ARIA live regions for broad compatibility.

Conclusion

Element.ariaNotify() queues screen reader announcements without requiring a DOM text change. Prefer combined messages, use high priority sparingly, and always feature-detect with an aria-live fallback while support remains limited.

Continue with ariaLive, append(), or the JavaScript hub.

💡 Best Practices

✅ Do

  • Feature-detect before calling ariaNotify
  • Combine related messages into one string
  • Keep a polite live-region fallback
  • Set lang when language matters for pronunciation
  • Test with a real screen reader in supporting browsers

❌ Don’t

  • Spam users with frequent high-priority notifies
  • Assume every browser supports the API yet
  • Rely on multiple rapid calls being spoken in order
  • Expect a return value or promise
  • Ignore Permissions Policy aria-notify blocks

Key Takeaways

Knowledge Unlocked

Five things to remember about Element.ariaNotify()

Queue AT speech from JS—feature-detect and fall back.

5
Core concepts
🔊 02

Queues

AT speech

A11y
03

Priority

normal / high

Urgency
🔍 04

Support

limited

Status
05

Fallback

aria-live

Safe

❓ Frequently Asked Questions

It queues a string of text for a screen reader to announce. You can call it at any time — announcements do not require a DOM content change like classic ARIA live regions.
No. MDN browser-compat marks it standard_track with experimental: false and deprecated: false. It is Limited availability (not Baseline yet) — support is still rolling out across browsers.
undefined. There is no promise or status object. Feature-detect the method, then call it; blocked Permissions Policy usage fails silently.
For urgent interruptions, similar to aria-live="assertive". Prefer priority: normal (default, like polite) for most status updates so you do not interrupt the user constantly.
MDN notes that some screen readers may only speak the most recent ariaNotify() call. Combining messages into one string is more reliable than firing several calls in a row.
Fall back to an ARIA live region (update textContent on an aria-live element) or another accessible pattern. Always feature-detect typeof el.ariaNotify === "function".
Did you know?

The same mixin powers Document.ariaNotify(). MDN’s shopping-list demo works the same if you call the method on an element reference instead of the document—choose the landmark that best matches the context of the announcement.

More Element Topics

Browse Element methods and ARIA properties to keep building accessible UIs.

ariaLive →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful