[Bug]: fluent-radio-group ignores value changes while disabled
Los mantenedores suelen responder en 2 días
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- frontend
Línea de trabajo
Abre radio-group.base.ts y lee el getter enabledRadios, el accesor set value(), checkRadio() y disabledChanged(); la corrección consiste en resolver el valor entrante contra todos los radios (no solo los habilitados) y en mantener coherente el índice marcado a través de disabledChanged(). Reproduce primero con el fragmento HTML del issue en la story o la página de pruebas de radio-group, para observar cómo value se ignora mientras está deshabilitado. Estará terminado cuando el radio marcado siga a value, tanto si el grupo como el radio objetivo están deshabilitados, y un test en el archivo de pruebas de radio-group lo cubra.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 20.4k
- Forks
- 3k
- Merge medio
- 3 d 15 h
- PR fusionados (30 d)
- 74
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/fluentui
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
Los mantenedores suelen responder en 2 días
-
[Bug]: Toaster throws in development when it has a style propPosiblemente ocupada @jakesalvesen la tomó hace 35 días. AbiertoComponent: Toast Fluent UI react-components (v9) Type: Bug :bug:
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
[Bug]: AriaLiveAnnouncer holds back a message announced in the commit that mounts itPosiblemente ocupada @dmytrokirpa la tomó hace 2 días. AbiertoArea: Accessibility Fluent UI react-components (v9) Type: Bug :bug:
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
microsoft/fluentui#37202 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
[Bug]: MessageBar announces the title and body without a space between themPosiblemente ocupada @jakesalvesen la tomó hace 2 días. AbiertoFluent UI react-components (v9) Type: Bug :bug:
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 2 días
-
[Bug]: Accordion crashes for scalar `defaultOpenItems={0}` (headless and styled v9)Posiblemente ocupada @arniebradfo la tomó hace 22 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
Todos los issues de microsoft/fluentui
Issues similares
-
generate_image reference URL guard lets through IPv4-mapped IPv6 hosts and 100.64.0.0/10Posiblemente ocupada @goranai la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Inbox permission: an allow sent with `updatedInput` is ignored by Claude Code on its own safety checksPosiblemente ocupada @Raj1v la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
backnotprop/plannotator#4046 ·
Los mantenedores suelen responder en 1 día
-
進捗部屋の管理画面で削除対象を月ごとに絞り込むAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
traPtitech/knoQ_R-UI#290 ·
Los mantenedores suelen responder en 24 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
farion1231/cc-switch#9981 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
account bug course exam iris lecture
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día