大网数据广告活动
Web 标准与前端开发

ARIA: aria-valuemax attribute

· 52CE 我爱测

The `aria-valuemax` attribute defines the maximum allowed value for a range widget.

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 progress, meter, and 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". The aria-valuemax attribute is used on all of the range roles subtypes.

Example

The code below shows a 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

  • Element.ariaValueMax
    • : The ariaValueMax property, part of the Element interface, reflects the value of the aria-valuemax attribute.
  • ElementInternals.ariaValueMax
    • : The ariaValueMax property, part of the ElementInternals interface, reflects the value of the aria-valuemax attribute.

Associated roles

Used in roles:

Inherited into roles:

Specifications

See also

来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
MDN Web Docs / Mozilla 贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 2.5

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。