gridstack.js icon indicating copy to clipboard operation
gridstack.js copied to clipboard

Move items with keyboard controls

Open CharlieWinkwaves opened this issue 6 months ago • 4 comments

Description

We are trying to get our application to comply to the a11y norm. One of the issues we encountered was that gridstack is not accessible with the keyboard. A user cannot select and move items around with only the use of a keyboard. What we have done is reuse the moving of items for the mouse for the keyboard.

This works, except when using items with different heights. When moving an item up or down and the item above or below has a greater height, then the item does not move. As we use the items height to move the item, I know that the position is only changed when it moves further than half way the other item. Is there a way we can know how far to move the item to make sure it changes position?

Checklist

  • [ ] Created tests which fail without the change (if possible)
  • [X] All tests passing (yarn test)
  • [ ] Extended the README / documentation, if necessary

CharlieWinkwaves avatar Jul 10 '25 14:07 CharlieWinkwaves