ARIA Widget Roles

ARIA role: slider

Build a form with the HTML form generator

A control for choosing a value from a continuous or discrete range. Prefer range input. Custom slider requires name and aria-valuenow; implement arrows and Home/End, with min/max and value text as appropriate. The example demonstrates a native equivalent or preferred alternative and deliberately omits redundant ARIA. Explicit roles do not implement visual presentation, interaction or focus management; verify allowed role/element combinations in ARIA in HTML. Accessibility exposure varies with browser, platform and assistive technology. Test relevant combinations; rendering is not proof of accessibility.

Formal Syntax & Structure

html syntaxhtml
role="slider"

Parameters & Attributes

NameTypeDescription
roletokenExplicit role token slider; use only where allowed. Omit when native semantics match.
aria-valuenownumberRequired for this custom role unless equivalent host semantics apply. Reports the current numeric value of a range control or indicator. Keep it within its declared bounds and update as the value changes. Supply aria-valuetext when the numeric value alone is insufficient. Values: finite numeric current value.
aria-valueminnumberRelevant when applicable. Specifies the lower endpoint of a range widget or indicator. Coordinate it with the maximum and current value; it does not enforce input limits. Prefer native min where supported. Values: finite numeric minimum.
aria-valuemaxnumberRelevant when applicable. Specifies the upper endpoint of a range widget or indicator. Keep it greater than or equal to the minimum and keep the current value within the range. It does not constrain the value itself; prefer native max where available. Values: finite numeric maximum.
aria-valuetextstringRelevant when applicable. Provides meaningful text for a numeric range value when a number is not sufficient, such as a named size or temperature with units. Keep it synchronized with the real numeric value and localize the text. Values: human-readable current value.
aria-orientationtokenRelevant when applicable. Describes the orientation of a widget or separator. It does not change layout or arrow-key handling. Set it to match real visual and interaction orientation, considering role-specific defaults. Values: horizontal, vertical, undefined.

Working Example

Example Snippethtml
<label for="volume">Volume</label><input type="range" id="volume" min="0" max="100" value="30">
HTML Reference