primefaces / primefaces/primereact

Slider: range mode aria-valuenow isn't related to actual values

Open
#4,242 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: Accessibility Type: Bug
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.
image

image

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
  1. Drag one of the handles of the slider
  2. Inspect the slider handle element
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.