Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
290 stars 75 forks source link

List - arrow key navigation can get stuck #7936

Closed timmorey closed 11 months ago

timmorey commented 1 year ago

Check existing issues

Actual Behavior

When using arrow keys to navigate a list, you can get "stuck" in a state where up/down arrows fail to move you through the list items even though it looks like they should.

This occurs when you use the right-arrow on a list item that does not have any children. After you do this, it will still look like the list item is selected, but up/down arrows will stop working to move you through the list. Hitting the left-arrow at this time will restore the function of the up/down arrows.

This can also occur when you use the right-arrow on a list item with children that is already expanded. It seems like the list lets you left-arrow one step too far with all items.

Expected Behavior

When a list item is selected, up/down arrows should move selection through the list.

Reproduction Sample

https://codepen.io/_timmorey_/pen/YzdJrXL?editors=100

Reproduction Steps

  1. Select the first item in the list, which is an item that has children
  2. Hit right-arrow to expand. the item
  3. Hit right-arrow again, even though the item is expanded
  4. Attempt to use up/down arrows (no response)
  5. Hit left-arrow
  6. Hit down-arrow to move down to a child item
  7. Hit right-arrow on the child item
  8. Attempt to use up/down arrows (no response)

This is also reproducible in the documentation example: https://developers.arcgis.com/calcite-design-system/components/list/. My extended sample just adds a few child list items to exercise stuff more.

Reproduction Version

1.8.0

Relevant Info

Tested on Chrome Version 117.0.5938.132 (Official Build) (arm64) on MacOS 13.5.2

Regression?

No response

Priority impact

p2 - want for current milestone

Impact

Users that prefer or rely on keyboard navigation can get into a confusing state where up/down arrow keys stop responding even though they look like they should work to move selection.

Calcite package

Esri team

ArcGIS Field Apps

driskull commented 11 months ago

I think this may have been fixed with #7974

geospatialem commented 11 months ago

Verified in 2.0.0 per https://github.com/Esri/calcite-design-system/issues/7936#issuecomment-1836968845