Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update focus order in sankey chart for vertical navigation #31469

Merged
merged 6 commits into from
May 28, 2024

Conversation

krkshitij
Copy link
Contributor

@krkshitij krkshitij commented May 23, 2024

Previous Behavior

The focus first moves through all the links and then the nodes, not following a logical sequence in the Sankey chart.

New Behavior

The focus moves layer by layer in a vertical order. It first moves through the nodes in the 1st layer, then the links starting from these 1st layer nodes, and continues this pattern through each subsequent layer.

  • Horizontal focus navigation has been disabled because the nodes and links are rendered vertically, causing the left/right arrow keys to move focus up or down to the previous or next sibling element.
  • Bidirectional focus navigation has been disabled because it causes the up/down arrow keys to move the focus in a non-sequential and erratic manner within a 2D grid.

In FocusZone, the focus order is determined by the rendering order of the elements. Although the new focus order may not be entirely logical, it seems to be the most effective solution with FocusZone ensuring that the links (especially skip layer links) do not render over the nodes.

Future Work

A more logical focus order in the Sankey chart would involve navigating focus horizontally, moving to the node first, then the connecting link, followed by the target node, and so on. This focus order needs to be implemented without altering the rendering order of nodes and links.

@fabricteam
Copy link
Collaborator

fabricteam commented May 23, 2024

📊 Bundle size report

✅ No changes found

Copy link

codesandbox-ci bot commented May 23, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@krkshitij krkshitij marked this pull request as ready for review May 27, 2024 05:57
@krkshitij krkshitij requested a review from a team as a code owner May 27, 2024 05:57
@krkshitij krkshitij enabled auto-merge (squash) May 28, 2024 09:14
@krkshitij krkshitij merged commit ea6069e into microsoft:master May 28, 2024
17 of 19 checks passed
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request May 28, 2024
* master: (49 commits)
  Update focus order in sankey chart for vertical navigation (microsoft#31469)
  chore: use new performant 'type-check' for v9 libaries (microsoft#31454)
  applying package updates
  fix(Timepicker-compat): clearIcon not working in freeform (microsoft#31324)
  chore: re-enable lint rule (microsoft#31459)
  feat(react-tag-picker): adds text property to TagPickerOption (microsoft#31474)
  feat(recipes): create package with initial implementation (moved from /apps) (microsoft#31386)
  applying package updates
  applying package updates
  chore: revert globals changes (microsoft#31470)
  (web-components) Use `ElementInternals` for TextInput elements (microsoft#31201)
  chore:(docs) Update and migrate component implementation guide (microsoft#31398)
  disallow all globals in Fluent v9 (microsoft#30967)
  chore:(react-nav-preview) Recomposing more components and some pixel pushing (microsoft#31387)
  fix(pr-deploy-site): explicitly set types to not include whole @types/* globals which are causing issues with addition of @types/web (microsoft#31465)
  fix(recipes-react-components): explicitly set types to not include whole @types/* globals which are cauising issues with addition of @types/web (microsoft#31463)
  applying package updates
  applying package updates
  applying package updates
  Update IconDirectionContextProvider import to import from specific path (microsoft#31006)
  ...
miroslavstastny pushed a commit to miroslavstastny/fluentui that referenced this pull request Jun 14, 2024
…#31469)

Co-authored-by: Shubhabrata Ghosh <shubhabrata08@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants