Skip to content

Focus redirection does not work for mat-radio-button #13953

@jelbourn

Description

@jelbourn

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.

Metadata

Metadata

Assignees

Labels

AccessibilityThis issue is related to accessibility (a11y)P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions