Tab key should not select an html select option, but move to the next focusable element
Categories
(Firefox :: Untriaged, defect)
Tracking
()
People
(Reporter: hugovieilledent+bugzilla, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0
Steps to reproduce:
- make an html select element https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select
- use <tab> to focus it on the web-page,
- navigate through its options with the arrow keys
- use <tab> again, it selects the focus option (it activates it)
Actual results:
When an option is selected, using <tab> again will select the option.
Expected results:
Keyboard key <tab> is used to navigates through the links of a webpage, and other focusable elements, like this select
( <shift+tab> bavigates backwards).
In the case of links, a
elements, <return> (<enter>) will activate the link and open its destination.
In the case of selects, <tab> will activate the link.
As a user it feels that using <tab> in an open (where an option is focused) select, should move to the next focusable element, and not activate the selects' selected option.
<return> should, like with links, activate the selected option.
Note: when select elements are focused (with the tab key), they will only show their option with the use of the <space> key. If <space> is not used, <tab> will move to the next focusable element.
Hope it makes sense (sry it's a lot of "select").
Thanks
Comment 1•6 years ago
|
||
Hi,
I cannot reproduce the issue on Ubuntu 16.04 x32 using the latest Nightly 67.0a1 (20190131214909) or latest Release. I have also tried on Release 64.0 and 64.0.2 but without success. Every time after I navigated through the options with the arrow keys (on the example page) if I pressed the Tab it jumped to the next focusable element, the behavior was the same in other browsers as well.
Could you please retest on the lates Release 65 and if the issue is reproducible on your side, could you also retest using safe mode (https://goo.gl/AR5o9d), maybe even a new clean Firefox profile (https://goo.gl/AWo6h8), to eliminate add-ons or custom settings as a possible cause?
Hello and thank you for your answer.
I think I might not have correctly explained the bug, or mistaken it with a behavior when the select has an onchange
event when its option list is open.
I've made an example here
https://jsbin.com/hizunakayi/4/edit?html,js,console,output
- navigate to the HTML select element with <tab>
- open it with <space>
- move to an option with <arrow-down>
- press <tab>
This triggers the onchange
event of the select (when <return> could be expected from the preceding behavior).
It then lets the focus on the select element, instead of moving to the next HTML element, because <tab> selected the element.
Maybe this is the expected behavior, and therefore excuse me for the false report.
Just to clarify, you are expecting that once you have navigated by keyboard to an option in a select, pressing tab will navigate away from the element without selecting a value?
Yes. Now that it is formulated this way, I'm not sure if that makes any sense.
Description
•