How do I select multiple non-consecutive options from an html multiple select using just the keyboard in chrome?
I have tried a few ways to do it, but could not get it to go. I filed a bug regarding this. I will update this if i hear anything.
Assuming you navigate through tabs to the multiple select element, then:
- Press the right click button [ to the left of the right located Ctrl key ].
- Press the ESC button.
Set the "selected" property of each option you want to select by typing, for example:
document.getElementsByTagName("option")[0].selected = true; document.getElementsByTagName("option")[2].selected = true;
- Hit ENTER key
- The submitting of the form is not part of the answer to the question but you could either press ESC again and press CTRL+L to navigate to the submit button OR some JavaScript submitting.
You can try this here:http://www.w3schools.com/tags/tryit_view.asp?filename=tryhtml_select_multiple
This will be fixed in upcoming chrome update 80.0.3953.0 (after 8-ish years).
- Ctrl+[Up|Down] - moves the focus independently from selection.
- [Ctrl+Space|Spacebar] - toggles selection of the currently focused item.
Thread: https://bugs.chromium.org/p/chromium/issues/detail?id=982450
Bug Fix: https://chromium.googlesource.com/chromium/src.git/+/68562ee3f5eabfed9a480bfeb08d3d6bc7daa205