patternfly / patternfly/patternfly-react
Bug - Button - update aria-disabled logic to be more correct
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 862
- フォーク
- 392
- 平均マージ
- 4日 8時間
- マージ済み PR(30日)
- 9
説明
Describe the problem
Followup to https://github.com/patternfly/patternfly-react/issues/11617 for breaking change release. We should update the logic of aria-disabled being applied. Currently aria-disabled is always set and is setup to basically match the disabled value (otherwise we end up with aria-disabled being false when disabled is true, which is contradictory and has potential to cause issue with AT – FWIW in limited testing it seems like disabled has priority, but should still be considered an issue).
Additionally, we were mixing the way to disable the Button depending on the component prop in https://github.com/patternfly/patternfly-react/pull/11478. Instead we should be more explicit that isDisabled should be used when a) the component is button, or b) the button doesn't need to be focusable for a tooltip or similar, and isAriaDisabled should be used when a) the component is anything other than button, or b) when the button is intended to be focusable/hoverable to trigger a Tooltip or similar.
Expected behavior
aria-disabled only renders when true, which matches how the disabled attribute gets rendered (only when true, not rendered when false), and aria-disabled must be set explicitly (rather than having isDisabled set it when component !== button).
Jira Issue: PF-2208
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず TypeScript の Button コンポーネントと、既存のアクセシビリティテストのカバレッジを見つけます。isDisabled、isAriaDisabled、component、disabled、aria-disabled がどのように扱われているかを確認し、aria-disabled が明示的に true の場合にのみレンダリングされること、またドキュメント化されているフォーカス可能なケースとフォーカス不可能なケースが期待どおりに動作することを検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- react, typescript
- 領域
- accessibility, frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100