aria-valuemax
{{AccessibilitySidebar}}
The aria-valuemax
attribute defines the maximum allowed value for a range widget.
Description
The aria-valuemax
attribute defines the maximum value allowed for range widgets. It is similar to the max
attribute of {{HTMLElement('progress')}}
, {{HTMLElement('meter')}}
, and {{HTMLElement('input')}}
of type range
, number
and all the date-time types.
When creating a range type role, including meter
, scrollbar
, slider
, and spinbutton
on a non-semantic element, the aria-valuemax
enables defining a maximum that is more than the minimum value and is a required attribute of slider
, scrollbar
and spinbutton
.
Declaring the minimum and maximum values allows assistive technologies to convey the size of the range to users. The minimum value is defined with aria-valuemin
.
[!WARNING] The
range
role itself should NOT be used as it is an “abstract”. Thearia-valuemax
attribute is used on all of the range roles subtypes.
Example
The code below shows a simple slider with a maximum value of 9.
<div id="dimesLabel">Dimes</div>
<div
role="slider"
aria-valuenow="0"
aria-valuemin="0"
aria-valuemax="9"
aria-labelledby="dimesLabel"
id="dimes"></div>
Values
<number>
- : An integer or decimal number that is greater than the minimum value.
Associated interfaces
{{domxref("Element.ariaValueMax")}}
- : The
ariaValueMax
property, part of the{{domxref("Element")}}
interface, reflects the value of thearia-valuemax
attribute.
- : The
{{domxref("ElementInternals.ariaValueMax")}}
- : The
ariaValueMax
property, part of the{{domxref("ElementInternals")}}
interface, reflects the value of thearia-valuemax
attribute.
- : The
Associated roles
Used in roles:
meter
scrollbar
(required)separator
slider
(required)spinbutton
(required)
Inherited into roles:
Specifications
{{Specifications}}