Description
mat-radio-button has some code to redirect focus to the underlying native <input type="radio">
. This seems to not actually work, though, because calling .focus()
on the <mat-radio-button>
does not trigger a focus
event.
You can see the behavior here, with radio buttons inside of a dialog with cdkFocusInitial
The same problem almost certainly exists for mat-checkbox
and mat-button-toggle
.
I'm not sure the best way to approach this, but one idea would be to use focusin
or useCapture
on a top-level element and specifically check for the controls in question.