Skip to content
Bug reportNov 19, 2026· 0:19· 12 views

shadcn/ui Base UI Calendar: arrow keys do not move focus between days

0:19 total

Comments · 0

Be the first to comment.

Bug reportby SceneRecap AI

mediumBase UI variant of the Calendar component: focus handling on day buttons, specifically the click to focus path and the keyboard grid navigation that depends on the focused day.
os: macOSdpr: 1tab: Base UIurl: /docs/components/base/calendarlocale: en-USbrowser: Chromium 151.0.7922.34timezone: Europe/Berlinviewport: 1280x720

Repro steps

  1. 1.Open /docs/components/base/calendar with the Base UI tab selected. The demo calendar shows Nov 2026 with day 19 selected.
  2. 2.Scroll down until the calendar demo is in view.
  3. 3.Click the day button "15".
  4. 4.Press ArrowRight three times.
  5. 5.Press ArrowLeft three times.

Expected

Clicking day 15 moves DOM focus to the day 15 button. Pressing ArrowRight three times moves focus to day 18. Pressing ArrowLeft three times moves focus back to day 15.

Actual

Day 15 becomes selected and shows a visual ring, but document.activeElement is <body>. Pressing ArrowRight three times and ArrowLeft three times has no effect. The focused day stays 15 and activeElement stays <body>.

Evidence

visualBefore the click, day 19 is the selected day in the Nov 2026 calendar.
visualClick on the day button "15". Selection works: day 15 is now filled black and day 19 is no longer selected.
visualOverlay reports: Clicked day 15, visual ring appeared, document.activeElement: <body>, NOT the calendar button (should be <button>).
visualAfter three ArrowRight presses (7.846s, 8.262s, 8.667s), overlay reports focused day 15, still 15. Expected 18.
visualAfter three ArrowLeft presses (11.242s, 11.597s, 11.952s), overlay reports focused day 15 unchanged, DOM activeElement <body>, arrow keys have no effect.
visualState is unchanged at the end of the recording. Day 15 is still selected and the overlay still reports activeElement <body>.
consoleMany link preload warnings for fonts, images and CSS not used soon after load. These appear before any interaction and look unrelated to the focus issue.
Issue markdown (copy-paste ready)
## Summary
On the shadcn/ui Calendar docs page (Base UI tab), clicking a day selects it but does not move DOM focus to the day button. `document.activeElement` stays `<body>`, so arrow key navigation between days does nothing.

## Environment
- Browser: Chromium 151.0.7922.34
- OS: macOS
- Viewport: 1280x720, DPR 1
- Locale: en-US, timezone Europe/Berlin
- URL: /docs/components/base/calendar (Base UI tab)

## Steps to reproduce
1. Open /docs/components/base/calendar with the Base UI tab selected (0s). The demo shows Nov 2026 with day 19 selected.
2. Scroll the calendar demo into view (3.0s).
3. Click the day button "15" (4.959s).
4. Press ArrowRight three times (7.846s, 8.262s, 8.667s).
5. Press ArrowLeft three times (11.242s, 11.597s, 11.952s).

## Expected
The click on day 15 focuses that day button. Three ArrowRight presses move focus to day 18. Three ArrowLeft presses move focus back to day 15.

## Actual
Day 15 is selected and shows a visual ring, but `document.activeElement` is `<body>` (7.0s). After three ArrowRight presses, the focused day is still 15 (11.0s). After three ArrowLeft presses, it is still 15 and activeElement is still `<body>` (13.0s). Nothing changes through the end of the recording (18.8s).

## What works
The click does select the day: day 15 becomes the selected date and day 19 is deselected (4.959s to 7.0s). Only focus and keyboard navigation fail.

## Evidence
- 7.0s: overlay shows `document.activeElement: <body>`, not the calendar button.
- 11.0s: overlay shows focused day 15 after 3x ArrowRight. Expected 18.
- 13.0s: overlay shows focused day 15 unchanged after 3x ArrowRight and 3x ArrowLeft, activeElement `<body>`.
- 2.8s: console shows many link preload warnings. They occur before any interaction and look unrelated.

## Suggested area
Base UI Calendar day button focus handling. Check whether day buttons receive focus on click, and whether the keyboard grid navigation handler is attached where focus actually lands.

*Recorded with SceneRecap.*

Your recordings could explain themselves too.

Free plan · silent recordings welcome · bug reports included.

Try SceneRecap free →
shadcn/ui Base UI Calendar: arrow keys do not move focus between days · SceneRecap