[Bug]: fluent-radio-group ignores value changes while disabled
メンテナーはふだん 2 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- frontend
調査の方向性
radio-group.base.ts を開き、enabledRadios ゲッター、set value() アクセサー、checkRadio() と disabledChanged() を読んでください。修正は、受け取った値を有効なラジオだけでなくすべてのラジオに対して解決し、disabledChanged() をまたいで選択中のインデックスの整合性を保つことです。まず issue にある HTML スニペットを radio-group のストーリーまたはテストページで再現し、無効化中に value が無視される様子を確認してください。グループまたは対象のラジオのどちらが無効でも、選択中のラジオが value に追従し、その動作を radio-group のテストファイルのテストがカバーしていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Component
RadioGroup
Package version
3.2.1 (same logic on main)
@microsoft/fast-element version
3.0.4
Environment
Any browser. Found via Fluent UI Blazor v5, which wraps fluent-radio-group.
Current Behavior
While the group is disabled (or the target radio is disabled), setting value on fluent-radio-group is ignored and the previously checked radio stays checked.
In radio-group.base.ts, enabledRadios returns [] when the group is disabled and leaves out disabled radios. set value() looks up the new value with enabledRadios.findIndex(...) and checkRadio() only updates enabledRadios, so nothing matches. disabledChanged() resets checkedIndex, which also has no effect at that point.
Expected Behavior
The checked radio follows value even when the group or the target radio is disabled. Disabled should block user interaction, not programmatic value changes.
Reproduction
https://github.com/microsoft/fluentui-blazor/issues/5639
Steps to reproduce
<fluent-radio-group id="g" value="a">
<fluent-radio value="a">A</fluent-radio>
<fluent-radio value="b">B</fluent-radio>
</fluent-radio-group>
<script>
const g = document.getElementById('g');
g.disabled = true;
g.value = 'b';
// expected: radio "b" is checked, actual: radio "a" stays checked
</script>
The same happens when the group is enabled but radio "b" has disabled.
Are you reporting an Accessibility issue?
None
Suggested severity
Medium - Has workaround
Products/sites affected
Fluent UI Blazor (FluentRadioGroup). Workaround there is @key to recreate the element. Blazor-side workaround PR: https://github.com/microsoft/fluentui-blazor/pull/5658
Are you willing to submit a PR to fix?
yes
Validations
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- 主要言語
- TypeScript
- スター
- 20.4k
- フォーク
- 3k
- 平均マージ
- 3日 15時間
- マージ済み PR(30日)
- 74
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/fluentui のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 2 日以内に返信
-
[Bug]: Toaster throws in development when it has a style prop対応中かも @jakesalvesen が 35 日前に担当しました。 オープンComponent: Toast Fluent UI react-components (v9) Type: Bug :bug:
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
[Bug]: AriaLiveAnnouncer holds back a message announced in the commit that mounts it対応中かも @dmytrokirpa が 2 日前に担当しました。 オープンArea: Accessibility Fluent UI react-components (v9) Type: Bug :bug:
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
microsoft/fluentui#37202 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
[Bug]: MessageBar announces the title and body without a space between them対応中かも @jakesalvesen が 2 日前に担当しました。 オープンFluent UI react-components (v9) Type: Bug :bug:
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 2 日以内に返信
-
[Bug]: Accordion crashes for scalar `defaultOpenItems={0}` (headless and styled v9)対応中かも @arniebradfo が 22 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
microsoft/fluentui の issue をすべて見る
似ている issue
-
generate_image reference URL guard lets through IPv4-mapped IPv6 hosts and 100.64.0.0/10対応中かも @goranai が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
Inbox permission: an allow sent with `updatedInput` is ignored by Claude Code on its own safety checks対応中かも @Raj1v が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
backnotprop/plannotator#4046 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
traPtitech/knoQ_R-UI#290 ·
メンテナーはふだん 24 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
farion1231/cc-switch#9981 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
account bug course exam iris lecture
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信