Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tour's Slider: keyboard accessibility #366

Closed
forresto opened this issue May 28, 2020 · 2 comments · Fixed by #381
Closed

Tour's Slider: keyboard accessibility #366

forresto opened this issue May 28, 2020 · 2 comments · Fixed by #381
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@forresto
Copy link

forresto commented May 28, 2020

Trying the web demo, when an input type=range slider has focus, I expect to be able to use the arrow keys to change the value.

https://github.com/hecrj/iced/blob/ead4186870d1b46015986f702dd63382498060fc/examples/tour/src/main.rs#L394-L403

This step=0.01 could be part of the issue:

https://github.com/hecrj/iced/blob/ead4186870d1b46015986f702dd63382498060fc/web/src/widget/slider.rs#L117-L121

Is the state of the demo enforcing the integer-rounding? So, arrow-right makes the value 50.01, but then the state rounds it back to 50?


Edit: most everything else is keyboard-accessible, so we should celebrate that! 🌮 🎉

@hecrj
Copy link
Member

hecrj commented May 29, 2020

Is the state of the demo enforcing the integer-rounding? So, arrow-right makes the value 50.01, but then the state rounds it back to 50?

Yes, you are correct. We should make step a first-class attribute of the Slider widget.

@hecrj hecrj added bug Something isn't working good first issue Good for newcomers labels May 29, 2020
@hecrj hecrj added this to the 0.2.0 milestone May 29, 2020
@loewenheim
Copy link

loewenheim commented Jun 2, 2020

If I understand this correctly, only the web version of the slider needs a step attribute, right? I don’t see any reference to it in the native version.

EDIT: Nevermind, I realized that both versions of the widget need to have the same interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants