openui / open-ui

Maintain an open standard for UI and promote its adherence and adoption.
https://open-ui.org
Other
3.59k stars 191 forks source link

[invokers] stepUp and stepDown actions for number inputs #968

Closed lukewarlow closed 7 months ago

lukewarlow commented 11 months ago

See https://github.com/openui/open-ui/pull/967 for a PR by @spookylukey

See:

The idea is that with this in place, we could easily create more visually appealing (and accessible) versions of <input type=number> without any javascript.

For example, the number widgets in this shopping basket from https://abilitynet.org.uk/training/how-use-screen-reader-accessibility-testing?utm_source=Intro-Screen-Readers&utm_medium=Factsheet-Highlights&utm_campaign=2023-Training-Promo

Screenshot 2023-12-03 at 14-15-42 How to use a screen reader for accessibility testing AbilityNet

It also requires some CSS to hide the native spinners - https://stackoverflow.com/questions/3790935/can-i-hide-the-html5-number-input-s-spin-box

Opening the issue to have a place to discuss and agenda+ if necessary.

lukewarlow commented 11 months ago

I'm not against the idea I think it fits into the spirit of invokers being "declarative method invocation".

I do think it'd need some thoughts on how exactly it's mapped to aria.

I also wonder if it's potentially the wrong solution. Should we just have a standardised anatomy for <input type="number"> that allows for the visually appealing design above.