jaredLunde / masonic

🧱 High-performance masonry layouts for React
https://codesandbox.io/s/0oyxozv75v
MIT License
797 stars 49 forks source link

Tab navigation doesn't seem to work correctly #138

Closed bigfarts closed 1 year ago

bigfarts commented 1 year ago

Describe the bug Pressing Tab to switch focus to the next item in the grid selects items in an order that is not left-to-right, top-to-bottom.

To Reproduce Steps to reproduce the behavior:

  1. Create a masonry grid.
  2. Press Tab a few times and watch the focus jump around the page. The initial Tab press also selects the entire grid.

Expected behavior Pressing Tab should navigate through the items left-to-right top-to-bottom. Additionally, tab should not select the grid as a whole (the grid has tabindex=0 set).

Desktop (please complete the following information):

Additional context The DOM elements of the grid items seem to be in an arbitrary order, which does not play nicely with tab navigation.

jaredLunde commented 1 year ago

Appreciate your taking the time to file an issue. You're making poor assumptions here, many of which are covered in other issues. Unfortunately, I don't have time to seek them out for you.