Pressing space selects the suggesition from the dropdown instead of destroying it.
After typing a word if the user presses spacebar, the first option in the dropdown gets selected. As I was using the textArea I found it annoying and I had to go back and delete the previous word.
The user intention of pressing the spacebar would be after completing the word and has neglected the current suggestions from dorpdown.
https://github.com/user-attachments/assets/bb1b9019-b311-424b-9523-1ed1e1ff2917
@Sudharshaun w3c standard suggests that tab must be used for choice and not space
yes, that is my point here as well.
hm, in my experience, floating search suggestions in large textareas generally use space for selection (for speed). I can think of https://www.google.co.in/inputtools/try/ as an example.
Narrow input auto-suggestions generally neither react to space nor tab, but rely on an up/down selection, for example, Google search suggestions.
w3c standard suggests that tab must be used for choice and not space
@RohitKumarGit can you provide a link for this?
Hi @knadh according to this ( semantically we should follow this standard as ours is also a selectbox with dynamic positioning ) https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/
my personal thinking is , that with space is good when you have only 1 option and you have nothing to choose ( like Gmail ).. like a suggestion and not a choice.
See the "Listbox Popup" section , there they have mentioned. :
Space => Opens the listbox without moving focus or changing selection.
and
Tab
- Sets the value to the content of the focused option in the listbox.
- Closes the listbox.
- Performs the default action, moving focus to the next focusable element. Note: the native