primefaces / primefaces/primereact
Slider: range mode aria-valuenow isn't related to actual values
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 8.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
When using the slider with step 5, min 10, max 50, I would expect that the aria-valuenow would reflect the steps' values when they are selected. However, the aria-valuenow is instead a copy of the style="left: ... percentage.


Reproducer
https://codesandbox.io/s/primereact-test-forked-31vw6s?file=/src/index.js
PrimeReact version
9.2.2
React version
18.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
- Drag one of the handles of the slider
- Inspect the slider handle element
- View the aria-valuenow (as compared to the steps that should be there, between 10-50 by fives)
Expected behavior
The handle's aria-valuenow value should be the same as the "selected" step value. In this example, if I drag the left side handle up 1 step, the value should be 15.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodeSandbox reproducer and the Slider range-mode implementation; inspect how each handle's aria-valuenow is computed for min 10, max 50, and step 5. Done means the reported value matches the selected step, such as 15, rather than the handle's CSS percentage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- accessibility, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100