---
url: /components/sliders/accessibility.md
description: >-
  Sliders let users make selections from a range of values. There are four
  configurations: continuous, discrete, centered, range selection.
---

# Sliders

Sliders let users make selections from a range of values. There are four configurations: continuous, discrete, centered, range selection.

[Overview](overview.md) · [Specs](specs.md) · [Guidelines](guidelines.md) · **Accessibility**

## Use cases

People should be able to do the following using assistive technology:

* Navigate to a slider 
* Select a range by controlling a handle along a track
* Get appropriate feedback based on input type

## Interaction & style

The slider handle shrinks in width and the value appears to provide a visual cue to the user that the handle is being pressed.

**Touch**

When tapped or dragged, the handle width shrinks to provide interaction feedback, and the value appears.

**Cursor**

When hovered, the cursor changes. When clicked and dragged, the handle width shrinks, and the value appears.

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Flx2tjccg-GM3-Components-accessibility-Sliders-1-v01_1.mp4?alt=media" aria-label="Dragging a slider using a mouse cursor and by touch. Handle width shrinks when dragged."></video>

The slider handle changes width during interaction

### Focus and navigation

Initial focus lands directly on the handle, since it’s the primary interactive element of the slider.

The slider value can then be adjusted using the arrow keys or other keyboard navigation options.

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Flx2tk5qd-GM3-Components-accessibility-Sliders-2-v01.mp4?alt=media" aria-label="Using keyboard navigation on a slider. Tab to the handle, and use arrow keys to change the value."></video>

Use arrow keys to change the slider value

## Color contrast

Use visual anchors so the end of the slider’s inactive track has at least 3:1 contrast with the background. The stop indicator makes the end easily visible on most backgrounds.

![The inactive track has contrast below 3:1 with the background. The stop indicator is above 3:1. Slider is accessible.](/assets/a8a209f1-lx1s6sg3-3.zrTSLLvm.webp)

A stop indicator on the inactive track makes it easier to identify the end of the slider on a low-contrast background

Alternatively, icons or other elements that have a 3:1 contrast with the background can be used to indicate the ends of the slider’s inactive track.

![The inactive track has contrast ratio below 3:1 with the background. The icon is above 3:1. The slider is accessible.](/assets/634f0a50-lx1s73wl-4.BFXjK7vt.webp)

Icons make it easier to identify the ends of the slider on a low-contrast background

## Keyboard navigation

| Keys           | Actions                                                               |
| -------------- | --------------------------------------------------------------------- |
| Tab            | Moves focus to the slider handle                                      |
| Arrows         | Increase and decrease the value by one value or one stop indicator    |
| Space & Arrows | Increase and decrease the value by one interval or one stop indicator |
| Home or End    | Set the slider to the first and last values on the slider             |

## Labeling elements

The accessibility label for a slider is typically the same as the slider's adjacent text label. It should have the **slider** role.

![Annotated aria tags of a slider.](/assets/014534ba-m0o6wp1l-5.DQ3DVh6g.webp)

A slider’s accessibility label should match the adjacent UI text

If the UI text is correctly linked to the slider, assistive tech (such as a screenreader) will read the UI text followed by the component’s role.

![Annotated aria tags of a slider with stepper icons.](/assets/7f1c6d45-m3601h6w-6.B5sN20rz.webp)

Icon buttons placed outside the slider should have the button role
