patternfly / patternfly/patternfly-react
Table - allow providing aria-label to the input for row selection
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 862
- Forks
- 392
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 9
Description
Hi there 👋
Just wondering if it would make sense to allow providing a custom aria-label for the input used for row selection (radio or checkbox, depending on the TdSelectType variant). From what I can see, the label is currently hardcoded as Select row ${rowIndex} in the selectable decorator, and I couldn't find a way to customize it.
I'm not sure if I'm missing something or if overriding that label would go against intended usage, but I believe being able to provide a custom value to at least support translations might be useful in some cases.
Would this be a reasonable thing to support?
Thanks!
Jira Issue: PF-2346
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 in packages/react-table/src/components/Table/utils/decorators/selectable.tsx, where the row-selection aria-label is currently assembled, and trace how TdSelectType and table selection props reach that decorator. Check the component documentation for the supported selection API. Done means consumers can provide a custom label for both checkbox and radio row inputs while the existing default remains available and translations are supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- accessibility, frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100