lime-elements
lime-elements copied to clipboard
limel-list: keyboard navigation is broken for lists with checkboxes or radio buttons (affects typeahead too)
Current behavior
https://user-images.githubusercontent.com/154725/143221299-48ba2760-adae-4270-87d9-d54f1bf43fba.mov
Steps to reproduce the behavior:
- Go to the docs for limel-list and scroll to the example called "List with checkboxes".
- Focus the list in some way (clicking the disabled option "Charmander" or clicking on an item in the preceding list and then tabbing to the checkbox list both work).
- You can now move the focus between all list items using the up and down arrow keys.
- Move to "Pikachu".
- Press
space
orenter
to deselect "Pikachu".
- The list loses focus, which is the first bug here.
- Select "Pikachu" again, either by focusing the list and then using the keyboard, or simply by clicking on the checkbox, it doesn't matter.
- Try to navigate to the bottom of the list using the arrow keys.
- You can't move past "Yoshi". The two last items in the list can no longer be focused. Other combinations of selecting and deselecting items result in other items becoming unreachable.
Expected behavior
The list should not lose focus when items are deselected, and all list items should always be reachable by keyboard.
Environment
- lime-elements version: At least v34.0.2-next.10 and later, but I think the issue is older.
- Framework used: Can be reproduced in the docs.
- Logs: