ni / nimble

The NI Nimble Design System
https://nimble.ni.dev
MIT License
29 stars 9 forks source link

Add keyboard navigation to table #2172

Closed msmithNI closed 1 week ago

msmithNI commented 3 weeks ago

Pull Request

🤨 Rationale

Resolves #1137

👩‍💻 Implementation

See #2173 for the most up-to-date expected behavior of keyboard navigation that this PR implements. (Direct link to updated HLD)

The KeyboardNavigationManager class does the bulk of the work:

The overall approach of only setting tabindex=0 on the single element in the table we want focused is called roving tabindex.

To ensure that we control what elements in the table should get focused, this PR updates tabindex on many elements in the table:

🧪 Testing

Keyboard navigation can be used on any/all of the existing table Storybook pages, once the table is focused.

✅ Checklist

msmithNI commented 3 weeks ago

@atmgrifter00 added you as the initial buddy for these changes. @jattasNI added you so you can begin reviewing it if you have time/ suggestions now, otherwise you can wait until I add owners.