Skip to content

fix(Tree): keep the roving tab stop on the selected row while focus is outside the tree - #2860

Draft
jcosta33 wants to merge 14 commits into
fix/tree-focus-prunefrom
fix/tree-focus-follows-selection
Draft

jcosta33 wants to merge 14 commits into
fix/tree-focus-prunefrom
fix/tree-focus-follows-selection

Conversation

@jcosta33

@jcosta33 jcosta33 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

While focus is outside the tree, Tab lands on the first visible selected row (in multi-select, the first checked row or fully checked folder), per the WAI-ARIA tree pattern, instead of the last clicked or arrowed row. In Frontify/web-app#16877 that is the page being viewed.

Tests: the focus-follows-selection cases in useTreeController.spec.tsx and the Tab and focus cases in TreeRoot.ct.tsx.

@changeset-bot

changeset-bot Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5e20f05

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@frontify/fondue-components Patch
@frontify/fondue Patch
@frontify/fondue-sdk Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jcosta33
jcosta33 force-pushed the fix/tree-focus-prune branch from bc2b98a to dab2aba Compare September 25, 2026 15:02
@jcosta33
jcosta33 force-pushed the fix/tree-focus-follows-selection branch from f4ce890 to dfe20f1 Compare September 25, 2026 15:02
@jcosta33
jcosta33 force-pushed the fix/tree-focus-prune branch from b8c5c07 to 10d007e Compare October 6, 2026 12:18
@jcosta33
jcosta33 force-pushed the fix/tree-focus-follows-selection branch from 42810a5 to 47ec977 Compare October 6, 2026 12:22
…tion

Resolves the conflict by deriving the tab stop instead of setting it during render: while focus is outside, it is the first visible selected or checked row, else the stored focused row. Focus-within is now the single state flag from the base branch, which an emptied tree clears, so Tab finds the selected row again once rows return.
…tion

# Conflicts:
#	packages/components/src/components/Tree/components/TreeRoot.ct.tsx
#	packages/components/src/components/Tree/components/TreeRoot.tsx
…tion

# Conflicts:
#	packages/components/src/components/Tree/components/TreeRoot.ct.tsx
…tion

# Conflicts:
#	packages/components/src/components/Tree/components/TreeRoot.ct.tsx
#	packages/components/src/components/Tree/components/TreeRoot.tsx

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant