In a previous commit, I added tabKeyNavigation behavior. However, it ultimately relied on translating the tab\shift+tab action into arrow keys to figure out which view to focus. It didn't occur to me before though that arrow keys CAN behave differently depending on whether they're horizontal or vertical (easily observable when the focus zone controls are not all laid out on a single row or column), and there might be scenarios where either don't behave right, especially with circular navigation.
I also noticed arrow key behaviors (including the non-circular cases) as implemented on macOS are different in the Win32 (Office) version AND the web version of Fluent. But this change doesn't aim to address only of that. In this change we will only update tab\shift+tab to behave like the system key view loop, which should provide a more predictable behavior than arrow keys.
Verification
Manual testing:
Navigation, including wrap around, behaves consistently with tab and shift+tab for various cases of tabKeyNavigation in the newly added "FocusZone Grid" case.
Platforms Impacted
Description of changes
In a previous commit, I added
tabKeyNavigation
behavior. However, it ultimately relied on translating the tab\shift+tab action into arrow keys to figure out which view to focus. It didn't occur to me before though that arrow keys CAN behave differently depending on whether they're horizontal or vertical (easily observable when the focus zone controls are not all laid out on a single row or column), and there might be scenarios where either don't behave right, especially with circular navigation.I also noticed arrow key behaviors (including the non-circular cases) as implemented on macOS are different in the Win32 (Office) version AND the web version of Fluent. But this change doesn't aim to address only of that. In this change we will only update tab\shift+tab to behave like the system key view loop, which should provide a more predictable behavior than arrow keys.
Verification
Manual testing:
tabKeyNavigation
in the newly added "FocusZone Grid" case.Old behavior: https://github.com/user-attachments/assets/657a760d-4132-4513-8247-a913d75dfec7 New behavior: https://github.com/user-attachments/assets/3d5a0bd1-5606-4d9f-866c-e265e49142e1
Pull request checklist
This PR has considered (when applicable):