ni / nimble

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

Consider adding strongly-typed properties for managing keyboard-nav-related state on table components #2211

Open msmithNI opened 1 week ago

msmithNI commented 1 week ago

🧹 Tech Debt

tabindex

Currently, the table KeyboardNavigationManager programmatically changes tabindex on table rows, cells, selection checkbox, anchors in cells, the action menu button, etc.

In these cases, tabindex is currently set to an initial value in the templates, but it's not clear from just looking at the template that the values are actually dynamic / may changed.

For now, we added comments ("tabindex managed dynamically by KeyboardNavigationManager") to the dynamic tabindex instances in the templates, so we're aware (for future refactoring/ code changes).
However it may be better to add strongly typed properties that we bind tabindex to, so it' s clearer that they're changed by KeyboardNavigationManager.

See PR comment

Cell action menu 'cell-action-menu-focused' CSS class

Similar story with the action menu button cell-action-menu-focused CSS class (it's applied dynamically by keyboard nav).

PR comment