Unable to focus radio button with Tab key if the first radio button is hidden,
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox125 | --- | wontfix |
firefox126 | --- | wontfix |
firefox127 | --- | verified |
firefox128 | --- | verified |
People
(Reporter: alice0775, Assigned: Jamie)
References
(Regression)
Details
(Keywords: nightly-community, regression)
Attachments
(4 files)
Steps to reproduce:
- Open attached html
- Press Tab key
Actual results:
Radio button would not get focus.
Expected Results:
Radio button gets focus. Google Chrome does.
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=efe1984e433c45c08394285def0b6ea943e9666e&tochange=58b9b5fc1b66092c32a6128f60ae2d4c2d44f9f4
Comment 1•8 months ago
|
||
:Jamie, since you are the author of the regressor, bug 1267488, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Comment 2•8 months ago
|
||
I report another case caused by bug 1267488.
Unable to focus cloned radio button with Tab key.
Steps to reproduce:
- Open attached test2.html
- Click "Clone" button.
- Press Tab or Shift + Tab.
Actual results:
The radio button in the first row can be focused, but the cloned radio button cannot be focused
Expected Results:
The cloned radio button is focused with Tab key.
Assignee | ||
Comment 3•8 months ago
|
||
(In reply to EarlgreyTea from comment #2)
Actual results:
The radio button in the first row can be focused, but the cloned radio button cannot be focusedExpected Results:
The cloned radio button is focused with Tab key.
This is intentional. The cloned radio buttons are in the same group (where group is defined by the name attribute per the spec), so they should only be reachable with the arrow keys once you tab to the first button in the group. Note that before bug 1267488, this would also have been the case once any of the 4 radio buttons was checked.
Assignee | ||
Updated•8 months ago
|
Assignee | ||
Comment 4•8 months ago
|
||
This fixes two problems:
- If no radio button is checked and the first radio button is hidden, tabbing will reach the first visible radio button in the group, rather than just skipping the group.
- If you press down arrow or up arrow and the next/previous radio button is hidden, focus will move to the next/previous visible radio button in the group, rather than doing nothing.
Comment 5•8 months ago
|
||
(In reply to James Teh [:Jamie] from comment #3)
This is intentional. The cloned radio buttons are in the same group (where group is defined by the name attribute per the spec),
Thank you for reply. I understand that this is an intentional behavior.
However, since the behavior is different from Chrome and Edge, I am considering whether to report it as a separate bug.
In Chrome and Edge, use the Tab key to move focus between the top and bottom radio buttons.
I think it's probably because it's inside another "div" element.
Assignee | ||
Comment 6•8 months ago
|
||
I'd argue this is a bug in Chromium. It does treat them as the same group, as evident in the fact that down arrow from the second radio button moves to the third radio button. If they're in the same group, tab should only reach one item in the group. Furthermore, if you check one of the radio buttons, only that radio button is tabbable, which further suggests these are intended to be treated as a single group.
Comment 7•8 months ago
|
||
Apparently, my "test2.html" code was not realistic. After cloning, I am placing it in the same document without changing the name property.
Therefore, I don't think it will be a problem on a actual site.
Updated•7 months ago
|
Updated•7 months ago
|
Updated•7 months ago
|
Updated•7 months ago
|
Assignee | ||
Comment 9•7 months ago
|
||
Comment 10•7 months ago
|
||
bugherder |
Comment 11•7 months ago
|
||
The patch landed in nightly and beta is affected.
:Jamie, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox126
towontfix
.
For more information, please visit BugBot documentation.
Comment 12•7 months ago
|
||
Comment 13•7 months ago
|
||
bugherder |
Assignee | ||
Updated•7 months ago
|
Updated•7 months ago
|
Comment 14•7 months ago
|
||
Issue is reproducible on a 2024-04-19 Nightly build on Windows 10.
Verified as fixed on Firefox Nightly 128.0a1 and Firefox 127.0b4 on Windows 10, macOS 12, Ubuntu 22.
Description
•