Labeling
- Give every
SliderThumbInputan accessible name witharia-labeloraria-labelledby; in a range slider name the ends ("Minimum price", "Maximum price"). - Show the value nearby when its meaning is not obvious from the label.
Keyboard Behavior
AnnouncementFocus the demo and press a key from the table.
| Key | Action |
|---|---|
| →↑ | Increases the value of the focused thumb by one step. In a horizontal RTL slider, Chromium and Firefox increase it on ← instead; Safari does not mirror the arrows. |
| ←↓ | Decreases the value of the focused thumb by one step. In a horizontal RTL slider, Chromium and Firefox decrease it on → instead; Safari does not mirror the arrows. |
| Page UpPage Down | Increases or decreases the value by a tenth of the range, or by one step if it is larger. |
| HomeEnd | Moves the thumb to its minimum or maximum. In a range, a thumb stops at the neighbouring thumb, keeping minStepsBetweenThumbs. |
| TabShift + Tab | Moves the focus between thumbs. Each thumb is its own tab stop. |
Focus Behavior
- Focus lands on the native input of a thumb; the
SliderThumbIndicatorshowsfocus-visiblewith--focus-color.
Screen Reader Semantics
- Each thumb is a native slider with
aria-valuenow,aria-valuemin,aria-valuemaxfrom the input; with several thumbs the min and max are the neighbours, so screen readers announce how far a thumb can move. aria-orientationfollows the rootorientation.SliderThumbIndicatorisaria-hidden; its content is decoration only. Put the accessible text onSliderThumbInputwitharia-valuetext.- Use
aria-valuetexton a thumb when the number alone is not meaningful ("20 °C").
Form Semantics
- Each thumb submits under its
nameor the rootname; several thumbs with the same name read withFormData.getAll. - A form reset restores the default values; a canceled reset leaves them.
- A
<fieldset disabled>disables the thumbs and clicks on the track.
Accessibility Risks
- unlabeled thumbs
- no visible value feedback for precision-sensitive controls
- vertical slider rendered too small to use comfortably