patternfly / patternfly/patternfly-react

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

オープン
#11,912 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

A11y Stale
主要言語
TypeScript
スター
862
フォーク
392
平均マージ
4日 8時間
マージ済み PR(30日)
9

説明

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

packages/react-table/src/components/Table/utils/decorators/selectable.tsx から始めて、行選択の aria-label が現在組み立てられている箇所を確認し、TdSelectType とテーブルの選択 props がその decorator にどのように渡るかを追跡してください。サポートされている選択 API について、コンポーネントのドキュメントを確認してください。checkbox と radio の行入力の両方に対して利用者がカスタムラベルを指定でき、既存のデフォルトも引き続き利用可能で、翻訳にも対応していれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
react, typescript
領域
accessibility, frontend
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
68/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。