Element.ariaValueMax is an instance property that reflects the aria-valuemax attribute. Learn how it declares the maximum allowed value for a range widget, how it pairs with aria-valuemin and aria-valuenow, 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
Maximum allowed
04
Reflects
aria-valuemax
05
Status
Baseline widely
06
Used on
Slider · range
Fundamentals
Introduction
Range widgets—volume sliders, progress bars, day-of-week pickers—have a lowest and highest allowed value. Assistive technologies need the maximum so they can announce the scale (for example “1 to 7”).
aria-valuemax declares that ceiling. The DOM property ariaValueMax lets you read and update it from JavaScript.
JavaScript
const el = document.getElementById("slider");
console.log(el.ariaValueMax); // "7"
el.ariaValueMax = "6";
💡
Beginner tip
Prefer <input type="range"> when a native control fits. Use ariaValueMax for custom role="slider", progressbar, spinbutton, or scrollbar widgets.
Concept
Understanding the Property
MDN: the ariaValueMax property of the Element interface reflects the value of the aria-valuemax attribute, which defines the maximum allowed value for a range widget.
Reflected attribute — mirrors aria-valuemax.
Get / set — readable and writable string number.
Range ceiling — the highest allowed value.
Baseline — widely available since October 2023 (MDN).
Foundation
📝 Syntax
JavaScript
ariaValueMax
Value
A string which contains a number (the maximum allowed value).
Item
Detail
Type
string containing a number (e.g. "7")
Reflects
aria-valuemax
Applies to
slider, progressbar, spinbutton, scrollbar, and similar ranges
Prefer ariaValueMax 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: "ariaValueMax" in Element.prototype,
pairWith: ["aria-valuemin", "aria-valuenow", "aria-valuetext"],
tip: "Prefer input type=range when a native control fits",
status: "Baseline Widely available (MDN)"
});
Element.ariaValueMax 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.ariaValueMax
String number — reflects aria-valuemax (maximum for a range widget).
BaselineWidely available
Google ChromeSupported (ARIA reflection)
Yes
Microsoft EdgeSupported (ARIA reflection)
Yes
Mozilla FirefoxSupported (ARIA reflection)
Yes
Apple SafariSupported (ARIA reflection)
Yes
OperaFollow Chromium support
Yes
Internet ExplorerNo ariaValueMax IDL — use setAttribute
No
ariaValueMaxBaseline
Bottom line: Use ariaValueMax to get/set aria-valuemax. Keep min ≤ now ≤ max. Prefer native range inputs when possible. Pair with aria-valuemin, aria-valuenow, and optional aria-valuetext.
Wrap Up
Conclusion
ariaValueMax reflects aria-valuemax so range widgets can declare their maximum. Use string numbers, keep now within the bounds, and prefer native range inputs when they are enough.
Rebuild native range inputs with ARIA without need
Forget to update visuals when max changes
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about ariaValueMax
Reflected aria-valuemax string for the maximum of a range widget.
5
Core concepts
📄01
Get / set
on Element
Kind
📝02
String number
maximum 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-valuemax attribute as a string containing a number that defines the maximum allowed value for a range widget (for example a slider, progressbar, spinbutton, or scrollbar).
No. MDN marks Element.ariaValueMax as Baseline Widely available (since October 2023). It is not Deprecated, Experimental, or Non-standard.
A string that contains a number (for example "7" or "6"), not a JavaScript Number type.
Use aria-valuemax with aria-valuemin (minimum), aria-valuenow (current), 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 ariaValueMax for custom range widgets.
Yes. Reading and writing ariaValueMax updates the reflected aria-valuemax attribute.
Did you know?
MDN’s day-of-week slider uses aria-valuemax="7" with aria-valuetext="Sunday"—the number is the machine value; the text is what users hear.