-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Focus issue for radio group as first element in dialog #17876
Labels
area: material/dialog
area: material/radio
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Comments
crisbeto
added
has pr
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
labels
Jan 1, 2020
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Jan 1, 2020
Currently all radio buttons inside a radio group have a `tabindex` of 0, unless they're disabled, and we leave it up to the browser to focus the proper button based on its selected state when the user is tabbing. This works for the most part, but it breaks down with something like our focus trap which determines which element to focus based on its `tabindex` since all buttons have the same `tabindex`. These changes fix the issue by setting a `tabindex` of 0 only on the selected radio button. Fixes angular#17876.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Feb 22, 2020
Currently all radio buttons inside a radio group have a `tabindex` of 0, unless they're disabled, and we leave it up to the browser to focus the proper button based on its selected state when the user is tabbing. This works for the most part, but it breaks down with something like our focus trap which determines which element to focus based on its `tabindex` since all buttons have the same `tabindex`. These changes fix the issue by setting a `tabindex` of 0 only on the selected radio button. Fixes angular#17876.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Jun 16, 2020
Currently all radio buttons inside a radio group have a `tabindex` of 0, unless they're disabled, and we leave it up to the browser to focus the proper button based on its selected state when the user is tabbing. This works for the most part, but it breaks down with something like our focus trap which determines which element to focus based on its `tabindex` since all buttons have the same `tabindex`. These changes fix the issue by setting a `tabindex` of 0 only on the selected radio button. Fixes angular#17876.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Nov 26, 2020
Currently all radio buttons inside a radio group have a `tabindex` of 0, unless they're disabled, and we leave it up to the browser to focus the proper button based on its selected state when the user is tabbing. This works for the most part, but it breaks down with something like our focus trap which determines which element to focus based on its `tabindex` since all buttons have the same `tabindex`. These changes fix the issue by setting a `tabindex` of 0 only on the selected radio button. Fixes angular#17876.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Dec 6, 2020
Currently all radio buttons inside a radio group have a `tabindex` of 0, unless they're disabled, and we leave it up to the browser to focus the proper button based on its selected state when the user is tabbing. This works for the most part, but it breaks down with something like our focus trap which determines which element to focus based on its `tabindex` since all buttons have the same `tabindex`. These changes fix the issue by setting a `tabindex` of 0 only on the selected radio button. Fixes angular#17876.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Jun 4, 2021
Currently all radio buttons inside a radio group have a `tabindex` of 0, unless they're disabled, and we leave it up to the browser to focus the proper button based on its selected state when the user is tabbing. This works for the most part, but it breaks down with something like our focus trap which determines which element to focus based on its `tabindex` since all buttons have the same `tabindex`. These changes fix the issue by setting a `tabindex` of 0 only on the selected radio button. Fixes angular#17876.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Aug 16, 2021
Currently all radio buttons inside a radio group have a `tabindex` of 0, unless they're disabled, and we leave it up to the browser to focus the proper button based on its selected state when the user is tabbing. This works for the most part, but it breaks down with something like our focus trap which determines which element to focus based on its `tabindex` since all buttons have the same `tabindex`. These changes fix the issue by setting a `tabindex` of 0 only on the selected radio button. Fixes angular#17876.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Mar 27, 2022
Currently all radio buttons inside a radio group have a `tabindex` of 0, unless they're disabled, and we leave it up to the browser to focus the proper button based on its selected state when the user is tabbing. This works for the most part, but it breaks down with something like our focus trap which determines which element to focus based on its `tabindex` since all buttons have the same `tabindex`. These changes fix the issue by setting a `tabindex` of 0 only on the selected radio button. Fixes angular#17876.
crisbeto
added a commit
that referenced
this issue
Mar 27, 2022
Currently all radio buttons inside a radio group have a `tabindex` of 0, unless they're disabled, and we leave it up to the browser to focus the proper button based on its selected state when the user is tabbing. This works for the most part, but it breaks down with something like our focus trap which determines which element to focus based on its `tabindex` since all buttons have the same `tabindex`. These changes fix the issue by setting a `tabindex` of 0 only on the selected radio button. Fixes #17876. (cherry picked from commit 81ff8c8)
crisbeto
added a commit
that referenced
this issue
Mar 27, 2022
Currently all radio buttons inside a radio group have a `tabindex` of 0, unless they're disabled, and we leave it up to the browser to focus the proper button based on its selected state when the user is tabbing. This works for the most part, but it breaks down with something like our focus trap which determines which element to focus based on its `tabindex` since all buttons have the same `tabindex`. These changes fix the issue by setting a `tabindex` of 0 only on the selected radio button. Fixes #17876.
forsti0506
pushed a commit
to forsti0506/components
that referenced
this issue
Apr 3, 2022
) Currently all radio buttons inside a radio group have a `tabindex` of 0, unless they're disabled, and we leave it up to the browser to focus the proper button based on its selected state when the user is tabbing. This works for the most part, but it breaks down with something like our focus trap which determines which element to focus based on its `tabindex` since all buttons have the same `tabindex`. These changes fix the issue by setting a `tabindex` of 0 only on the selected radio button. Fixes angular#17876.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area: material/dialog
area: material/radio
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Reproduction
I've recreated the issue here: https://stackblitz.com/edit/angular-2nkqr3-znajkf
Steps to reproduce:
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
The text was updated successfully, but these errors were encountered: