← Back to release summary

'step-up' and 'step-down' Invoker Commands

Category
DOM
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

Various inputs (e.g. number, range, date) have a mechanism to step up or down their values, via keyboard, AT action, and/or the stepUp() and stepDown() JS functions. The 'step-up' and 'step-down' commands are declarative versions of those functions.

Motivation

Browsers have built-in number inputs that generally have buttons to increment or decrement the inputs value, but these are hard to style, inconsistent and not always usable on mobile (Chrome is an example of this). By bringing the step up and step down capability to command invokers we enable a declarative way for authors to implement custom versions of these themselves. The ability to use the command button's value attribute as an argument (same way as the JS functions can take an argument) also enables creating buttons that jump the values in larger quantities.

Standards & signals

Ecosystem

Explainers: https://open-ui.org/components/future-invokers.explainer

View on chromestatus.com