[Bug]: fluent-radio-group ignores value changes while disabled
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- frontend
Research direction
Open radio-group.base.ts and read the enabledRadios getter, the set value() accessor, checkRadio() and disabledChanged(); the fix is to resolve the incoming value against all radios (not just enabled ones) and to keep the checked index consistent across disabledChanged(). Reproduce first with the HTML snippet from the issue in the radio-group story or test page so you can watch value be ignored while disabled. Done means the checked radio follows value whether the group or the target radio is disabled, covered by a test in the radio-group test file.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- TypeScript
- Stars
- 20.4k
- Forks
- 3k
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 74
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/fluentui
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 2 days
-
[Bug]: Toaster throws in development when it has a style propPossibly taken @jakesalvesen claimed this 35 days ago. OpenComponent: Toast Fluent UI react-components (v9) Type: Bug :bug:
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
[Bug]: AriaLiveAnnouncer holds back a message announced in the commit that mounts itPossibly taken @dmytrokirpa claimed this 2 days ago. OpenArea: Accessibility Fluent UI react-components (v9) Type: Bug :bug:
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
microsoft/fluentui#37202 · 1 comment · 1 assignee ·
Maintainers usually reply within 2 days
-
[Bug]: MessageBar announces the title and body without a space between themPossibly taken @jakesalvesen claimed this 2 days ago. OpenFluent UI react-components (v9) Type: Bug :bug:
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 2 days
-
[Bug]: Accordion crashes for scalar `defaultOpenItems={0}` (headless and styled v9)Possibly taken @arniebradfo claimed this 22 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
All issues in microsoft/fluentui
Similar issues
-
generate_image reference URL guard lets through IPv4-mapped IPv6 hosts and 100.64.0.0/10Possibly taken @goranai claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Inbox permission: an allow sent with `updatedInput` is ignored by Claude Code on its own safety checksPossibly taken @Raj1v claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
backnotprop/plannotator#4046 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
traPtitech/knoQ_R-UI#290 ·
Maintainers usually reply within 24 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
farion1231/cc-switch#9981 · 2 comments ·
Maintainers usually reply within 1 day
-
account bug course exam iris lecture
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day