JavaScript Element ariaDescription Property

Beginner
⏱️ 11 min read
📚 Updated: Jul 2026
🎯 5 Examples
🚀 5 Try-it labs
Baseline 2024
Instance property

What You’ll Learn

Element.ariaDescription is an instance property that reflects the aria-description attribute. Learn how a description string annotates an element, how it differs from aria-label and aria-describedby, and how to get or set the property from JavaScript—with five examples and try-it labs.

01

Kind

Instance property

02

Type

String

03

Reflects

aria-description

04

Purpose

Annotate / describe

05

Status

Baseline 2024

06

vs describedby

String vs element refs

Introduction

An accessible name tells users what a control is (“Close”). An accessible description adds longer context—what will happen, a warning, or extra detail.

aria-description stores that longer string on the element itself. ariaDescription is the JavaScript reflection of that attribute.

JavaScript
const el = document.getElementById("close-button");
console.log(el.ariaDescription);
el.ariaDescription = "A different description";
💡
Beginner tip

Keep aria-label (or visible text) short. Put longer help in ariaDescription—or use ariaDescribedByElements when the help text already lives in another element.

Understanding the Property

MDN: the ariaDescription property of the Element interface reflects the value of the aria-description attribute, which defines a string value that describes or annotates the current element.

  • Reflected attribute — mirrors aria-description.
  • Get / set — readable and writable string.
  • Annotation — extra context beyond the accessible name.
  • Baseline — newly available since March 2024 (MDN).

📝 Syntax

JavaScript
ariaDescription

Value

A string that describes or annotates the element.

ItemDetail
Typestring
Reflectsaria-description
vs nameDescription annotates; name identifies
vs aria-describedbyInline string vs references to other elements

📋 Close Button (MDN Shape)

MDN pairs a short aria-label with a longer aria-description on an icon-only close button:

JavaScript
<button
  aria-label="Close"
  aria-description="A longer description of the function of this element"
  id="close-button">
  X
</button>
JavaScript
let el = document.getElementById("close-button");
console.log(el.ariaDescription);
// "A longer description of the function of this element"
el.ariaDescription = "A different description";
console.log(el.ariaDescription); // "A different description"

⚖️ ariaDescription vs ariaDescribedByElements

ariaDescriptionariaDescribedByElements
ValueString on the elementArray of description elements
Best whenHelp text is a simple string in script/markupHelp text already exists as DOM nodes
Attributearia-descriptionaria-describedby
Baseline2024 (newly available)2025 (newly available)

⚡ Quick Reference

GoalCode / note
Readel.ariaDescription
Writeel.ariaDescription = "Help text"
HTML attributearia-description="Help text"
Feature-detect"ariaDescription" in Element.prototype
MDN statusBaseline Newly available (Mar 2024)

🔍 At a Glance

Four facts about Element.ariaDescription.

Kind
get / set

Instance

Type
string

Annotation

Reflects
aria-description

Attribute

Baseline
2024

Newly available

Examples Gallery

Examples follow MDN Element: ariaDescription. Labs use a close button so you can safely read and write the property.

📚 Getting Started

Read the reflected value and follow MDN’s get/set demo.

Example 1 — Read ariaDescription

Log the current description from the close button.

JavaScript
const el = document.getElementById("close-button");
console.log(el.ariaDescription);

// HTML includes: aria-description="A longer description..."
Try It Yourself

How It Works

The property returns the attribute string. If the attribute is missing, many browsers return null.

Example 2 — MDN Get and Set

MDN: read the description, assign a new string, and log again.

JavaScript
let el = document.getElementById("close-button");
console.log(el.ariaDescription);
// "A longer description of the function of this element"
el.ariaDescription = "A different description";
console.log(el.ariaDescription); // "A different description"
Try It Yourself

How It Works

Assigning the property updates the reflected aria-description attribute on the element.

📈 Create, Attribute Sync & Snapshot

Practice writes, reflection, and feature detection.

Example 3 — Create Element and Set Description

Build a button in script with a short name and a longer description.

JavaScript
const btn = document.createElement("button");
btn.textContent = "X";
btn.setAttribute("aria-label", "Close");
document.body.appendChild(btn);

btn.ariaDescription = "Closes the dialog without saving changes.";
console.log({
  name: btn.getAttribute("aria-label"),
  ariaDescription: btn.ariaDescription,
  attr: btn.getAttribute("aria-description")
});
Try It Yourself

How It Works

The short name stays on aria-label; the longer annotation lives on ariaDescription.

Example 4 — Property vs getAttribute

Confirm the attribute stays in sync after a write.

JavaScript
const el = document.createElement("button");
el.setAttribute("aria-label", "Close");
el.setAttribute("aria-description", "Original help text");
document.body.appendChild(el);

el.ariaDescription = "Updated help text";
console.log({
  fromProperty: el.ariaDescription,
  fromAttribute: el.getAttribute("aria-description"),
  same: el.ariaDescription === el.getAttribute("aria-description")
});
Try It Yourself

How It Works

Prefer ariaDescription in script; keep the attribute for HTML markup.

Example 5 — Support Snapshot

Feature-detect and remember name vs description.

JavaScript
console.log({
  supported: "ariaDescription" in Element.prototype,
  tip: "Short name + longer description string",
  alt: "Use ariaDescribedByElements when text is in the DOM",
  status: "Baseline Newly available (MDN, Mar 2024)"
});
Try It Yourself

How It Works

Feature-detect on older engines. On unsupported browsers, fall back to setAttribute("aria-description", …) if you need the attribute.

🚀 Common Use Cases

  • Icon-only buttons that need a short name plus longer spoken help.
  • Destructive actions with a warning string in script.
  • Dynamic UIs that update help text without creating extra DOM nodes.
  • Keeping script and markup aligned without manual setAttribute.
  • Teaching the difference between name, description string, and describedby.

🔧 How It Works

1

Element has an accessible name

From content, aria-label, labelledby, and so on.

Name
2

Optional aria-description

Add a string that annotates or describes the control.

Declare
3

Script can update ariaDescription

Property writes keep the reflected attribute in sync.

Update
4

Assistive tech can announce both

Name first, then the longer description when appropriate.

📝 Notes

Browser Support

Element.ariaDescription is Baseline Newly available (MDN: across latest browsers since March 2024). Feature-detect on older engines. Logos use the shared browser-image-sprite.png sprite from this project.

Baseline 2024

Element.ariaDescription

String — reflects aria-description annotations.

Baseline Newly available 2024
Google Chrome Supported in current releases — feature-detect older
Yes
Microsoft Edge Supported in current releases — feature-detect older
Yes
Mozilla Firefox Supported in current releases — feature-detect older
Yes
Apple Safari Supported in current releases — feature-detect older
Yes
Opera Follow Chromium support
Yes
Internet Explorer No ariaDescription IDL — use setAttribute
No
ariaDescription Baseline

Bottom line: Use ariaDescription for a string annotation beyond the accessible name. Prefer ariaDescribedByElements when help text already exists in the DOM. Feature-detect on older browsers and fall back to setAttribute if needed.

Conclusion

ariaDescription reflects aria-description so you can attach a string annotation to an element from JavaScript. Keep names short, descriptions helpful, and prefer element references when the help text already lives in the page.

Continue with ariaDetailsElements, ariaDescribedByElements, EventTarget, or the JavaScript hub.

💡 Best Practices

✅ Do

  • Provide a clear accessible name first
  • Use descriptions for longer help / warnings
  • Feature-detect on older browsers
  • Prefer describedby when text is already in the DOM
  • Keep description text concise enough to announce

❌ Don’t

  • Replace the accessible name with only a description
  • Duplicate the same text in label and description
  • Assume every older browser exposes the IDL property
  • Write essays—AT users hear every word
  • Confuse this with ariaControlsElements

Key Takeaways

Knowledge Unlocked

Five things to remember about ariaDescription

Reflected aria-description string that annotates an element.

5
Core concepts
📝 02

String

annotation text

Type
🔍 03

Beyond name

not a replacement

Rule
04

Baseline

newly available

Status
🎯 05

vs describedby

string vs elements

Compare

❓ Frequently Asked Questions

It reflects the aria-description attribute as a string that describes or annotates the current element—extra help beyond the short accessible name.
No. MDN marks Element.ariaDescription as Baseline 2024 (newly available since March 2024). It is not Deprecated, Experimental, or Non-standard. Feature-detect on older browsers.
aria-label (or visible text) is the accessible name. aria-description is a longer annotation. Keep the name short; put extra context in the description.
aria-description is a plain string on the element. aria-describedby / ariaDescribedByElements point to other elements whose text forms the description. Prefer describedby when the help text already exists in the DOM.
A string. Reading returns the current description (or null if unset in many browsers). Writing updates the reflected aria-description attribute.
Yes. Reading and writing ariaDescription updates the reflected aria-description attribute.
Did you know?

Support for aria-description as an attribute and for the IDL property has improved over time. Always feature-detect ariaDescription and keep a clear accessible name even when a description is present.

Next: Element ariaDetailsElements

Learn the reflected aria-details element-array property for verbose accessible details.

ariaDetailsElements →

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.

5 people found this page helpful