ARIA spinbutton Role
The spinbutton role marks a control for choosing a number, which the user can type or step up and down with arrow buttons or keys. An input with type number has this role.
Description
The spinbutton role identifies an input that lets the user pick a value from a range of discrete values, usually by typing it or by stepping it up and down. A quantity field is the classic example. Its current value is given by aria-valuenow, within aria-valuemin and aria-valuemax.
Keyboard users expect Up and Down to change the value by one step, Page Up and Page Down to change it by a larger step, and Home and End to jump to the limits. Increment and decrement buttons next to it are usually left out of the Tab order, since the keys already do the job.
The native <input type="number"> has this role. For numbers that aren't really quantities, such as card numbers or postcodes, use a plain text input with inputmode="numeric" instead.
Use the native HTML <input> element where you can: it already has the spinbutton 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
- None
- Supported
aria-errormessage,aria-invalid,aria-readonly,aria-required,aria-valuemax,aria-valuemin,aria-valuenow,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="spinbutton">
Example
Browser Support
The following information will show you the current browser support for the spinbutton ARIA role. Hover over a browser icon to see the version that first introduced support for this ARIA role.
Desktop





Tablets & Mobile





