bug(Button Toggle): Template-driven form not focusable #30097
Labels
area: material/button-toggle
P2
The issue is important to a large percentage of users, with a workaround
Is this a regression?
The previous version in which this bug was not present was
Up until v18
Description
On Button Toggle, in the examples with forms, the Reactive form is working fine but the "Template-driven form" is not focusable, when you try to tab into it, it just skips it.
All buttons in there has tabindex="-1" where in reactive-form only the first button has tabindex="0", even without any control ( formControl or ngModel ) it works fine and tabindex on the first button is 0 (if nothing is selected).
If there is anything selected when using ngModel, then it works fine as the other two (with formControl and without any control).
UPDATE: If there is button that reset the formControl, you also cannot access the toggle-button.
Reproduction
Material link: https://material.angular.io/components/button-toggle/examples
Steps to reproduce:
Expected Behavior
Expected behavior is to behave as the one that has FormControl and the one that has nothing in it. It's expected the first button to be focused if value isn't selected.
Actual Behavior
Button-toggle is not focusable if there isn't any selected value like without using ngModel.
Environment
The text was updated successfully, but these errors were encountered: