JavaScript Element ariaValueNow Property

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

What You’ll Learn

Element.ariaValueNow is an instance property that reflects the aria-valuenow attribute. Learn how it declares the current value for a range widget, how it pairs with aria-valuemin and aria-valuemax, and how to get or set it from JavaScript—with five examples and try-it labs.

01

Kind

Instance property

02

Type

String (number)

03

Meaning

Current value

04

Reflects

aria-valuenow

05

Status

Baseline widely

06

Used on

Slider · range

Introduction

Range widgets—volume sliders, progress bars, day-of-week pickers—have a lowest and highest allowed value. Assistive technologies need the current value so they can announce where the control sits on that scale (for example “2 of 1 to 7”).

aria-valuenow declares that current position. The DOM property ariaValueNow lets you read and update it from JavaScript.

JavaScript
const el = document.getElementById("slider");
console.log(el.ariaValueNow); // "1"
el.ariaValueNow = "2";
💡
Beginner tip

Prefer <input type="range"> when a native control fits. Use ariaValueNow for custom role="slider", progressbar, spinbutton, or scrollbar widgets.

Understanding the Property

MDN: the ariaValueNow property of the Element interface reflects the value of the aria-valuenow attribute, which defines the current value for a range widget.

  • Reflected attribute — mirrors aria-valuenow.
  • Get / set — readable and writable string number.
  • Current value — where the widget sits now.
  • Baseline — widely available since October 2023 (MDN).

📝 Syntax

JavaScript
ariaValueNow

Value

A string which contains a number (the current value).

ItemDetail
Typestring containing a number (e.g. "1")
Reflectsaria-valuenow
Applies toslider, progressbar, spinbutton, scrollbar, and similar ranges
Pair witharia-valuemin, aria-valuemax, optional aria-valuetext
⚠️
Keep the range consistent

Ensure aria-valueminaria-valuenowaria-valuemax. When you change the current value, keep it inside the min–max range and update aria-valuetext if you use labels.

📋 MDN Slider Example Shape

MDN starts with a slider marked aria-valuenow="1", then updates ariaValueNow to "2":

JavaScript
<div
  id="slider"
  role="slider"
  aria-valuenow="1"
  aria-valuemin="1"
  aria-valuemax="7"
  aria-valuetext="Sunday"></div>
JavaScript
let el = document.getElementById("slider");
console.log(el.ariaValueNow); // "1"
el.ariaValueNow = "2";
console.log(el.ariaValueNow); // "2"

This pattern often models days of the week (1–7) with aria-valuetext providing a spoken label like “Sunday.”

⚡ Quick Reference

GoalCode / note
Readel.ariaValueNow
Writeel.ariaValueNow = "2"
HTML attributearia-valuenow="1"
Native cousinvalue on <input type="range">
MDN statusBaseline Widely available

🔍 At a Glance

Four facts about Element.ariaValueNow.

Kind
get / set

Instance

Type
string

Number text

Reflects
aria-valuenow

Attribute

Baseline
widely

Oct 2023+

Examples Gallery

Examples follow MDN Element: ariaValueNow. Labs use a role="slider" so you can safely read and write the property.

📚 Getting Started

Read the reflected value and follow MDN’s current-value update.

Example 1 — Read ariaValueNow

Log the current value from a custom slider.

JavaScript
const el = document.getElementById("slider");
console.log(el.ariaValueNow);

// HTML includes: aria-valuenow="1"
Try It Yourself

How It Works

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

Example 2 — MDN Update to "2"

MDN: change the current value from 1 to 2.

JavaScript
let el = document.getElementById("slider");
console.log(el.ariaValueNow); // "1"
el.ariaValueNow = "2";
console.log(el.ariaValueNow); // "2"
Try It Yourself

How It Works

Assigning the property updates the reflected aria-valuenow attribute. Also update visuals and update aria-valuetext when the spoken label should change.

📈 Value Text, Attribute Sync & Snapshot

Practice pairing with valuetext and verify reflection.

Example 3 — Update aria-valuetext With Now

When the day index changes, keep the spoken label in sync.

JavaScript
const el = document.createElement("div");
el.setAttribute("role", "slider");
el.setAttribute("aria-valuemin", "1");
el.setAttribute("aria-valuemax", "7");
el.setAttribute("aria-valuenow", "1");
el.setAttribute("aria-valuetext", "Sunday");
document.body.appendChild(el);

const days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
el.ariaValueNow = "2";
el.setAttribute("aria-valuetext", days[Number(el.ariaValueNow) - 1]);
console.log({
  ariaValueNow: el.ariaValueNow,
  ariaValueText: el.getAttribute("aria-valuetext")
});
Try It Yourself

How It Works

Keep the numeric value and the spoken label aligned. Also stay within aria-valuemin and aria-valuemax.

Example 4 — Property vs getAttribute

Confirm the attribute stays in sync after a write.

JavaScript
const el = document.createElement("div");
el.setAttribute("role", "slider");
el.setAttribute("aria-valuenow", "1");
document.body.appendChild(el);

el.ariaValueNow = "2";
console.log({
  fromProperty: el.ariaValueNow,
  fromAttribute: el.getAttribute("aria-valuenow"),
  same: el.ariaValueNow === el.getAttribute("aria-valuenow")
});
Try It Yourself

How It Works

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

Example 5 — Support Snapshot

Feature-detect and remember the min / now / max trio.

JavaScript
console.log({
  supported: "ariaValueNow" in Element.prototype,
  pairWith: ["aria-valuemin", "aria-valuemax", "aria-valuetext"],
  tip: "Prefer input type=range when a native control fits",
  status: "Baseline Widely available (MDN)"
});
Try It Yourself

How It Works

Do not let the ARIA current value disagree with the thumb position—mismatched ranges confuse AT users.

🚀 Common Use Cases

  • Updating a custom slider as the user drags or presses arrow keys.
  • Progress bars reporting how far a task has completed.
  • Day-of-week or rating pickers that change the current index.
  • Keeping aria-valuetext in sync with the numeric value.
  • Keeping script and markup aligned without manual setAttribute.

🔧 How It Works

1

Define the range

Min and max set the allowed scale.

Bounds
2

ariaValueNow sets the current value

Where the widget sits right now.

Now
3

Stay inside min and max

Clamp if needed; update valuetext labels.

Bounds
4

Assistive tech understands the scale

Users hear min, now, and max together.

📝 Notes

Browser Support

Element.ariaValueNow is Baseline Widely available (MDN: across browsers since October 2023). Logos use the shared browser-image-sprite.png sprite from this project.

Baseline Widely available

Element.ariaValueNow

String number — reflects aria-valuenow (current value for a range widget).

Baseline Widely available
Google Chrome Supported (ARIA reflection)
Yes
Microsoft Edge Supported (ARIA reflection)
Yes
Mozilla Firefox Supported (ARIA reflection)
Yes
Apple Safari Supported (ARIA reflection)
Yes
Opera Follow Chromium support
Yes
Internet Explorer No ariaValueNow IDL — use setAttribute
No
ariaValueNow Baseline

Bottom line: Use ariaValueNow to get/set aria-valuenow. Keep min ≤ now ≤ max. Prefer native range inputs when possible. Pair with aria-valuemin, aria-valuemax, and optional aria-valuetext.

Conclusion

ariaValueNow reflects aria-valuenow so range widgets can declare their current value. Use string numbers, keep now within the bounds, and prefer native range inputs when they are enough.

Continue with ariaValueText, ariaValueMin, or the JavaScript hub.

💡 Best Practices

✅ Do

  • Use string numbers for the current value
  • Keep min ≤ now ≤ max
  • Update aria-valuetext when labels change
  • Prefer native type="range" when possible
  • Move the visual thumb with the ARIA value

❌ Don’t

  • Set now outside the min–max range
  • Treat the value as a Number type in ARIA APIs
  • Leave valuetext stale after now changes
  • Rebuild native range inputs with ARIA without need
  • Forget to update visuals when now changes

Key Takeaways

Knowledge Unlocked

Five things to remember about ariaValueNow

Reflected aria-valuenow string for the current value of a range widget.

5
Core concepts
📝 02

String number

current value

Type
🔍 03

Slider · range

custom widgets

Use
04

Baseline

widely available

Status
🎯 05

min · now · max

keep in sync

Tip

❓ Frequently Asked Questions

It reflects the aria-valuenow attribute as a string containing a number that defines the current value for a range widget (for example a slider, progressbar, spinbutton, or scrollbar).
No. MDN marks Element.ariaValueNow as Baseline Widely available (since October 2023). It is not Deprecated, Experimental, or Non-standard.
A string that contains a number (for example "1" or "2"), not a JavaScript Number type.
Use aria-valuenow with aria-valuemin (minimum), aria-valuemax (maximum), and optionally aria-valuetext (human-readable label).
Yes when possible. An HTML <input type="range"> already exposes min, max, and value without custom ARIA. Use ariaValueNow for custom range widgets.
Yes. Reading and writing ariaValueNow updates the reflected aria-valuenow attribute.
Did you know?

MDN’s day-of-week slider uses aria-valuenow="1" with aria-valuetext="Sunday"—the number is the machine value; the text is what users hear.

Next: ariaValueText

Learn the human-readable text alternative for range values.

ariaValueText →

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