You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Radio CVA has wrong behavior with callSetDisabledState = 'whenDisabledForLegacyCode' #53240
Which @angular/* package(s) are the source of the bug?
forms
Is this a regression?
No
Description
Angular v15 fixed a long-standing bug related to setDisabledState not always being called. The fix was a breaking change, so a configuration option, callSetDisabledState, was also introduced to provide a way to opt into the old, "legacy" behavior. The bug fix also caused a problem for radio buttons that was subsequently fixed by making the radio CVA default to using the "legacy" behavior. However, if you use the configuration option to opt into the legacy behavior (i.e. callSetDisabledState = 'whenDisabledForLegacyMode'), the radio CVA uses the non-legacy behavior. Here is a visual matrix of the scenarios:
This does not make sense. There is no reason that using 'whenDisabledForLegacyMode' should make the radio CVA use a non-legacy, problematic behavior.
The code is straightforward. It should just not include || callSetDisabledState === 'whenDisabledForLegacyMode' in the condition.
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run ng version)
changed the title [-]Radio CVA has wrong behavior with callSetDisabledState = 'whenDisabledForLegacyMode'[/-][+]Radio CVA has wrong behavior with callSetDisabledState = 'whenDisabledForLegacyCode'[/+]on Oct 17, 2025
@JeanMeche this can be closed. No upvotes, no reproduction, and needsTriage since 2023.
The clause the report asks to remove is the one that keeps [attr.disabled] working on radios, and it guards exactly the mode Google runs on internally, so removing it is a behavior change with a wide blast radius for a case nobody has reported hitting. In practice the clause is also close to redundant: in whenDisabledForLegacyCode mode setDisabledState is only called when the control is disabled, so isDisabled already satisfies the condition.
New work here is going into signal forms rather than the legacy CVAs.
Activity
Achilles1515 commentedon Jan 18, 2024
@dylhunn @pkozlowski-opensource status here?
[-]Radio CVA has wrong behavior with callSetDisabledState = 'whenDisabledForLegacyMode'[/-][+]Radio CVA has wrong behavior with callSetDisabledState = 'whenDisabledForLegacyCode'[/+]arturovt commentedon Sep 29, 2026
@JeanMeche this can be closed. No upvotes, no reproduction, and needsTriage since 2023.
The clause the report asks to remove is the one that keeps [attr.disabled] working on radios, and it guards exactly the mode Google runs on internally, so removing it is a behavior change with a wide blast radius for a case nobody has reported hitting. In practice the clause is also close to redundant: in whenDisabledForLegacyCode mode setDisabledState is only called when the control is disabled, so isDisabled already satisfies the condition.
New work here is going into signal forms rather than the legacy CVAs.
JeanMeche commentedon Oct 29, 2026
Without additional reports since the initial report and with the focus now on Signal forms, we won't be addressing this issue.