You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Tree View always returns focus to the selected element when regaining focus. This could lead to the entire tree being skipped if the selected element is not yet expanded.
💥 Steps to reproduce
Two related errors:
Focus regained at wrong location
Tab to the tree view.
Use arrow keys to navigate to item 1.1. Select it with enter.
Use arrow keys to navigate to item 1.2. Tab away from the component, and then shift-tab back to it.
Focus is on 1.1, but should be on 1.2.
Tree view skipped
Tab to the tree view.
Use arrow keys to navigate to item 1.1. Select it with enter.
Use arrow keys to navigate to item 1. Collapse it with ArrowLeft.
Tab away from the component, and then shift-tab back to it. The entire tree is skipped.
🐛 Bug report
The Tree View always returns focus to the selected element when regaining focus. This could lead to the entire tree being skipped if the selected element is not yet expanded.
💥 Steps to reproduce
Two related errors:
Focus regained at wrong location
Tree view skipped
💻 Link to reproduction
https://ark-ui.com/react/docs/components/tree-view
🧐 Expected behavior
I'd expect the focus handling to follow the w3 examples.
🧭 Possible Solution
Do not clear focus state when blurring the tree. I don't really see a reason to do any blur actions for the tree whatsoever.
🌍 System information
📝 Additional information
https://www.w3.org/WAI/ARIA/apg/patterns/treeview/examples/treeview-1a/
Aside: There's no zag documentation on the tree component. Is that intended?
The text was updated successfully, but these errors were encountered: