ARIA Widget Roles
ARIA role: spinbutton
An input for adjusting a numeric value in steps. Prefer number input for numeric quantities. Custom spinbutton needs a name, appropriate current value and keyboard increment/decrement; preserve normal text editing. 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="spinbutton"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| role | token | Explicit role token spinbutton; use only where allowed. Omit when native semantics match. |
| aria-valuenow | number | Relevant when applicable. 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-valuemin | number | Relevant 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-valuemax | number | Relevant 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-valuetext | string | Relevant 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. |
Working Example
Example Snippethtml
<label for="qty">Quantity</label><input id="qty" type="number" min="1" max="10" value="2">