'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
- Firefox: No signal
- Safari: No signal
- Web developers: No signals
- Tracking bug: https://issues.chromium.org/issues/476400454
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=step-up-and-step-down-invoker-commands
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+'step-up'%20and%20'step-down'%20Invoker%20Commands
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q='step-up'%20and%20'step-down'%20Invoker%20Commands
- Baseline status: https://webstatus.dev/?q='step-up'%20and%20'step-down'%20Invoker%20Commands
Explainers: https://open-ui.org/components/future-invokers.explainer