Support complex aria-labelledby queries
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript, react
- 領域
- frontend, testing-qa
調査の方向性
まず、getByLabelText のエントリポイントと、現在どのように label の関連付けを解決しているかを追跡します。提案されている pending-button の例を回帰テストとして使用し、スペースで区切られた複数の aria-labelledby ID も含めます。クエリが結合されたアクセシブルなラベルを解決し、テストでボタンの aria-disabled 属性を検証できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the feature you'd like:
I'd like getByLabelText to resolve the associated elements of aria-labelledby. As I'm writing this it occurs to me that this might be too costly and perhaps better suited to something like axe.
Describe alternatives you've considered:
I've resorted to a combination of getByRole + getByText and checking IDs.
Teachability, Documentation, Adoption, Migration Strategy:
The summarised/pseudo code looks something like:
let contentId = 'content-id';
let spinnerId = 'spinner-id';
return (
<button
aria-disabled={props.pending ? true : undefined}
aria-labelledby={props.pending ? `${contentId} ${spinnerId}` : undefined}
>
<span id={contentId}>{props.children}</span>
{props.pending && (
<span id={spinnerId} aria-label="pending" aria-hidden>
...
</span>
)}
</button>
);
The desired test would look something like:
it('supports "pending" prop', () => {
let { getByLabelText } = render(<Button pending>Submit</Button>);
expect(getByLabelText(`Submit ${PENDING_LABEL}`)).toHaveAttribute('aria-disabled', 'true');
});
- 主要言語
- JavaScript
- スター
- 19.7k
- フォーク
- 1.2k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
testing-library/react-testing-library のほかの issue
-
fireEvent.select does not wrap its automatic native focus in act対応中かも @sergioperezcheco が 6 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
bug: calling configure() without reactStrictMode resets it to undefined, silently disabling strict mode再び着手できるかも @suhailopensource が 76 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
testing-library/react-testing-library#1466 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
testing-library/react-testing-library#1459 · コメント 2 件 ·
-
perf: optimize container lookup with early exit再び着手できるかも @Ch-Abhinav-Chowdary が 302 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 35/100
testing-library/react-testing-library#1430 · コメント 1 件 ·
-
`fireEvent.mouseEnter` does not forward `relatedTarget` (relatedTarget is the window instead)対応中かも @swarnim02 が 319 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
testing-library/react-testing-library の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
quarto-dev/quarto-cli#15042 ·
メンテナーはふだん 1 日以内に返信
-
OpenCode install copies the Pi harness directory (`.pi/`) into the OpenCode config root対応中かも @gaurav0107 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
NaturalIntelligence/fast-xml-parser#890 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
Docs viewer: inverted grey colormap, Phantom CT window -20 to 35 HU, smoothing up to 40 mm対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンarea: docs enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
PyTomography/PyTomography#331 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
pnpm/get.pnpm.io#68 ·