patternfly / patternfly/patternfly-react

Table - allow providing aria-label to the input for row selection

Open
#11,912 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A11y Stale
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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.