react-component / react-component/slider

Add support for id property

Open
#997 1 comment 0 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

Most HTML controls have a property called id. This id is a unique identifier that identifies the element.
The id is also used to associate a label with an input. For instance,

Name

Under this situation if the user clicks on the label, the input is selected, input gains focus and handle keyboard events.

Unfortunately your component does not support the id property, therefore, it is not possible to associate a label to it.

Could you please add a prop id to your component? It would be a great accessibility improvement and I believe it would be very easy to do
Thanks in advance

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 by locating the slider component and its props definition, then inspect how HTML control attributes are passed through. Add support for the id prop so a label's for attribute can associate with the component, and verify that clicking the label focuses the input.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
accessibility, frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.