Skip to content

Focus issue for radio group as first element in dialog #17876

Closed
@mattharr

Description

@mattharr

Reproduction

I've recreated the issue here: https://stackblitz.com/edit/angular-2nkqr3-znajkf

Steps to reproduce:

  1. For the dialog opened by button 2, then select a radio option (say 'Badger')
  2. Tab through the elements to get to the Ok button.
  3. Press Tab

Expected Behavior

The focus in the radio group should be on the selected option.

Actual Behavior

The focus in the radio group is on the first option (whether it is selected or not)

Environment

Have tried this in both Firefox and Chrome

Notes

For the dialog by button 3 I have put an input control before the radio group in the tab order in the dialog, and this behaves as would be expected (tab takes you to the selected option).

I did ask about this in stackoverflow: https://stackoverflow.com/questions/59024581/radio-button-focus-in-angular-material-dialog (although I've only just put the correct tag on it), but I think its not something to be worked around with tab order.

Thanks,

Matt

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/dialogarea: material/radio

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions