react-component / react-component/slider

Setting aria-valuetexts for Range handles doesn't work

Open
#845 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.1k
Forks
768
Avg merge
11d 22h
Merged PRs (30d)
5

Description

Using the version 10.0.1.

In the documentation for Range it says that ariaValueTextFormatterGroupForHandles prop can be used to set the aria-valuetext for each handle. However this does not currently work. When looking at the Slider.tsx source code it looks like the prop is never used.

Looking at the code more tells that ariaValueTextFormatterForHandle prop accepts also an array like the other prop. Using this to try to set the value texts results in the following error:

Uncaught TypeError: _getIndex is not a function
  Handle webpack: /node_modules/rc-slider/es/Handles/Handle.js?:123

Is this a bug or am I missing something here?

Contributor guide

No contributing guide indexed for this repository

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 documented ariaValueTextFormatterGroupForHandles prop and its referenced code in src/Slider.tsx. Then inspect Handles/Handle.js, where the array form currently produces the _getIndex error. Done means Range handles expose the intended aria-valuetext values without throwing.

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.