ARIA slider Role
The slider role marks a custom control where the user picks a value from a range by moving a thumb, such as a volume control. An input with type range has this role.
Description
The slider role identifies an input where the user selects a value from a range, usually by dragging a thumb along a track. It requires aria-valuenow, and normally uses aria-valuemin and aria-valuemax too (0 and 100 by default). Use aria-valuetext when the number needs a readable form, such as "$250" or "Medium".
A custom slider must be focusable and respond to the arrow keys (one step), Page Up/Page Down (a bigger step) and Home/End (the minimum and maximum), and it should work with a pointer too. Its default orientation is horizontal.
The native <input type="range"> has this role and all the behavior built in, and it can be styled with CSS, so it is usually the better option. A range with two thumbs is built as two sliders.
Use the native HTML <input> element where you can: it already has the slider role, with the expected keyboard and browser behavior built in.
Properties
- Category
- Widget
- HTML equivalent
<input>- Accessible name from
- author
- Required parent role
- None
- Required child roles
- None
ARIA Attributes
- Required
aria-valuenow- Supported
aria-errormessage,aria-haspopup,aria-invalid,aria-orientation,aria-readonly,aria-valuemax,aria-valuemin,aria-valuetext- Prohibited
- None
- Global
- All global ARIA attributes can also be used, such as
aria-label,aria-labelledby,aria-describedby,aria-hidden.
Syntax
<element role="slider">
Example
Browser Support
The following information will show you the current browser support for the slider ARIA role. Hover over a browser icon to see the version that first introduced support for this ARIA role.
Desktop





Tablets & Mobile





