Skip to content

fix(react-headless-components-preview): use tab navigation in Nav instead of arrow keys - #36609

Merged
Dmytro Kirpa (dmytrokirpa) merged 2 commits into
microsoft:masterfrom
dmytrokirpa:fix/nav-tab-navigation
Aug 25, 2026
Merged

fix(react-headless-components-preview): use tab navigation in Nav instead of arrow keys#36609
Dmytro Kirpa (dmytrokirpa) merged 2 commits into
microsoft:masterfrom
dmytrokirpa:fix/nav-tab-navigation

Conversation

@dmytrokirpa

@dmytrokirpa Dmytro Kirpa (dmytrokirpa) commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Description

Removes the focusgroup arrow-key navigation from Nav and NavDrawerBody in the headless preview package. Navigation items are now reachable with sequential Tab navigation.

  • useNav no longer sets focusgroup="toolbar block wrap"; it still sets role="navigation".
  • useNavDrawerBody no longer sets focusgroup; it still sets role="navigation".
  • Dropped Nav from the focusgroup browser-support notice in the stories.

Nav links are natively focusable, so tab navigation matches the expected behavior of a list of links and removes the dependency on the focusgroup polyfill for this component. The navigation landmark role is preserved on both surfaces.

Verification

yarn nx run react-headless-components-preview:test -t Nav passes.

@dmytrokirpa
Dmytro Kirpa (dmytrokirpa) requested a review from a team as a code owner August 22, 2026 11:18
@github-actions

Copy link
Copy Markdown

Pull request demo site: URL

@github-actions

Copy link
Copy Markdown

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-headless-components-preview
react-headless-components-preview: entire library
238.059 kB
67.025 kB
237.981 kB
67.017 kB
-78 B
-8 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-headless-components-preview
@fluentui/react-headless-components-preview/tag-picker
53.982 kB
17.74 kB
react-headless-components-preview
@fluentui/react-headless-components-preview/teaching-popover
36.041 kB
11.992 kB
🤖 This report was generated against b5ec47fc035849b21b35d6f6054d60c0a64ff3db

@dmytrokirpa
Dmytro Kirpa (dmytrokirpa) merged commit 4456170 into microsoft:master Aug 25, 2026
16 of 17 checks passed
Ray Knight (ArrayKnight) added a commit to ArrayKnight/fluentui that referenced this pull request Aug 27, 2026
…nd Nav tab navigation

Two upstream behaviour changes reach this package through the headless layer.

POSITIONING (microsoft#36623). The headless `positioning` prop narrowed from `@fluentui/react-positioning`'s
`PositioningShorthand` to a headless one built on the ten props `usePositioning` actually reads.
`Combobox.tsx` and `Dropdown.tsx` each passed `autoSize: true` among the six values they restore
from react-combobox's `useComboboxPositioning`, and the narrowing rejects it. `autoSize` was already
dead weight: nothing in `hooks/usePositioning` reads it, so the key was being carried to a layer
that ignored it. Removed from both call sites; the comments now say five values and record why the
sixth is absent. No runtime behaviour moves, but the resulting Griffel delta was previously
undocumented, so MIGRATION.md gains delta 46: a Combobox or Dropdown listbox is not shrunk to the
space around its trigger the way floating-ui shrinks Griffel's.

NAV (microsoft#36609). Headless `useNav` stopped stamping `focusgroup="toolbar block wrap"`, so Nav rows are
now reached with Tab rather than the arrow keys. Parity follows headless — windmod passes the
attribute through and has none of its own to remove. `Nav.test.tsx`'s headless-stamp assertion
flips from asserting the value to asserting the attribute is absent, which is the assertion that
now carries weight: it fails if our layer ever puts one back. MIGRATION.md's delta 15 loses Nav
from the focusgroup list and gains the Tab-per-row consequence; Toolbar, TabList, TagGroup and
SwatchPicker keep theirs, and this package ships no NavDrawerBody, the change's other half.

Eight gates green: build (theme, headless, windmod), type-check, lint, lint:stories,
type-check:stories, test 3285/3285 across 143 suites.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013wmpBCYJpDJCLXcScCWz1i
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.

2 participants