seb-oss / green

Green is an open-source design system built by SEB.
https://storybook.seb.io/
Apache License 2.0
33 stars 47 forks source link

Slider: Should input field in slider a text input type? #1053

Open chijun950314 opened 11 months ago

chijun950314 commented 11 months ago

Does the component already exist

For which framework/library you are requesting the component

Angular

Description

In PR #1049, the input for the slider is changed from a number type to a text type. The input now no longer respond to up arrow key or down arrow key if user wished to step up or step down the value. I suggest to give the developers choice to pick which kinds of behavior they wished for the input.

Who will benefit from this feature?

Slider's user.

Anything else?

No response

splashdust commented 11 months ago

@chijun950314 Very good point!

I think we might be better off implementing the stepping action in JS though, because type='number' has some accessibility issues. Also, another often requested feature is number formatting, which will not work with type='number'. Making it configurable is of course still an option, but it would complicate the API and introduce more edge cases that needs to be maintained.

Thoughts and suggestions are welcome though!

EldRoos commented 2 days ago

Connected to #849.