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 | --- | fixed |
firefox128 | --- | fixed |
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•29 days 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•27 days 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•27 days 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•27 days ago
|
Assignee | ||
Comment 4•26 days 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•26 days 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•26 days 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•26 days 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•24 days ago
|
Updated•24 days ago
|
Updated•19 days ago
|
Updated•12 days ago
|
Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9ecb7d743524 Skip hidden radio buttons when determining which radio button to focus. r=smaug
Assignee | ||
Comment 9•9 days ago
|
||
Comment 10•9 days ago
|
||
bugherder |
Comment 11•9 days 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•9 days ago
|
||
Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/96318b9c6170 Add display: none tests for radio button focus. r=smaug
Comment 13•8 days ago
|
||
bugherder |
Assignee | ||
Updated•4 days ago
|
Updated•4 days ago
|
Description
•