elastic / eui

Elastic UI Framework 🙌
https://eui.elastic.co/
Other
50 stars 839 forks source link

[EuiComboBox] Broken keyboard interaction in `x` clear button #7289

Closed nickofthyme closed 3 days ago

nickofthyme commented 1 year ago

Describe the bug

Unable to access clear button on EuiComboBox from keyboard navigation.

Screen Recording 2023-10-16 at 07 14 26 PM

  1. Go to https://eui.elastic.co/#/forms/combo-box
  2. Click to focus and open any clearable comboBox
  3. Make a selection so the input is filled
  4. Press esc to close list and tab to the x clear button
  5. Press enter to clear the selection
  6. Notice nothing happens

Clicking the x has the intended affect just not via keyboard interaction.

nickofthyme commented 1 year ago

Just to add context -- using the space does work to trigger the x button as expected. Maybe that's the intended use. I'm not sure when or where space vs enter should be used but from this link it seems it would be better if both space & enter triggered the button.

image
cee-chen commented 1 year ago

+1, can confirm/repro the problem. FWIW, we've solved this problem in EuiSelectable (https://github.com/elastic/eui/pull/6631), so this bug will go away for free once we update EuiComboBox to dogfood EuiSelectable (https://github.com/elastic/eui/issues/2841).

The latter is on my list for the next month or so, so I'm tempted to wait until then to try and fix this issue.

hrmtn commented 10 months ago

In the showcase https://eui.elastic.co/#/forms/combo-box, space triggers the clear and not enter.

nickofthyme commented 10 months ago

@hrmtn correct that's what I stated in https://github.com/elastic/eui/issues/7289#issuecomment-1766721228, the question is whether it should trigger using either space or enter not only space.

cee-chen commented 3 days ago

The latter is on my list for the next month or so,

spongebob meme one year later... 💀