Skip to content

[toggle-group] Add enableHomeAndEndKeys prop for enhanced keyboard navigating - #3971

Merged
atomiks merged 2 commits into
mui:masterfrom
jijiseong:fix/keyboard-toggle-group
Feb 4, 2026
Merged

atomiks merged 2 commits into
mui:masterfrom
jijiseong:fix/keyboard-toggle-group

Conversation

@jijiseong

@jijiseong jijiseong commented Feb 4, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #3970

What’s included

pass the enableHomeAndEndKeys prop into ToggleGroup Component

Tests for Home / End key behavior

Verifies correct focus / selection movement when pressing Home And End

@pkg-pr-new

pkg-pr-new Bot commented Feb 4, 2026

Copy link
Copy Markdown
  • base-ui-tanstack-start

  • vite-css-base-ui-example

    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/react@3971
    
    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/utils@3971
    

commit: 814469f

@mui-bot

mui-bot commented Feb 4, 2026 •

Copy link
Copy Markdown

Bundle size report

Bundle Parsed size Gzip size
@base-ui/react 🔺+24B(+0.01%) 🔺+3B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@netlify

netlify Bot commented Feb 4, 2026

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 814469f
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6983813076cb670008a165e2
😎 Deploy Preview https://deploy-preview-3971--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@greptile-apps

greptile-apps Bot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

Enabled Home and End key navigation for ToggleGroup by passing enableHomeAndEndKeys prop to CompositeRoot. Tests verify that Home key moves focus to the first toggle and End key moves to the last toggle, with proper tabindex management.

Confidence Score: 5/5

  • This PR is safe to merge with no issues
  • Simple, focused change that adds a single prop to enable Home/End key navigation with comprehensive test coverage verifying the expected behavior
  • No files require special attention

Important Files Changed

Filename Overview
packages/react/src/toggle-group/ToggleGroup.tsx Enabled Home/End key navigation by passing enableHomeAndEndKeys prop to CompositeRoot
packages/react/src/toggle-group/ToggleGroup.test.tsx Added comprehensive tests for Home and End key navigation behavior

@atomiks atomiks added the component: toggle group Changes related to the toggle group component. label Feb 4, 2026

@atomiks atomiks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @jijiseong

@atomiks
atomiks merged commit 00fd4b7 into mui:master Feb 4, 2026
7 of 8 checks passed
@jijiseong
jijiseong deleted the fix/keyboard-toggle-group branch February 5, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: toggle group Changes related to the toggle group component.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[toggle-group] Missing Home / End keyboard navigation in ToggleGroup (ARIA spec)

3 participants