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

[a11y]: [Range] With small step prop, right arrow key stops working after a few presses #18557

Open
2 tasks done
mrbisson-ibm opened this issue Feb 11, 2025 · 0 comments
Open
2 tasks done

Comments

@mrbisson-ibm
Copy link

mrbisson-ibm commented Feb 11, 2025

Package

@carbon/react

Browser

Chrome

Operating System

MacOS

Package version

v1.61.0

React version

v18.2.0

Automated testing tool and ruleset

Manual testing / Bug logged against our product

Assistive technology

No response

Description

When a <Range> control has a step <= 0.2, the keyboard right arrow only works for small number of presses.

For example, when the step is 0.1 and the value is 0, I can press the right arrow key three times and the value correctly three times and the value increases each of those times; the fourth time has no effect.

WCAG 2.1 Violation

No response

Reproduction/example

https://stackblitz.com/edit/github-l6xz9dat?file=package.json

Steps to reproduce

  1. Create a <Range> component with these props:
  • min: 0
  • max: 1
  • step: 0.1
  • value: 0
  1. Tab to the slider thumb.
  2. Press the right arrow key. The value increments to 0.1. (Correct behaviour.)
  3. Repeat step 3 two more times. The value continues to successfully increment to 0.2 then 0.3.
  4. Repeat step 3 one more time. The value does not change.

Through experimentation, it seems the max value does not have an effect, and this bug can be reproduced so long as step is 0.2 or less.

I was also able to reproduce this on the React demo page for the Range filter, using the above props.

In addition to seeing this issue on Chrome (132.0.6834.112), I've also been able to reproduce it on Firefox (128.7.0esr) and Safari (17.4) - all on Mac OS X (14.4).

Suggested Severity

Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.

Code of Conduct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ⏱ Backlog
Development

No branches or pull requests

2 participants