Skip to content

fix: allow focused disabled days to remain focusable#2851

Merged
gpbl merged 4 commits intomainfrom
gpbl/issue2843
Nov 22, 2025
Merged

fix: allow focused disabled days to remain focusable#2851
gpbl merged 4 commits intomainfrom
gpbl/issue2843

Conversation

@gpbl
Copy link
Copy Markdown
Owner

@gpbl gpbl commented Nov 21, 2025

  • Refine day button logic: keep disabled days focusable, but only mark aria-disabled when the day retains focus.
  • Prevent disabled styling opacity from overriding selected state
  • Add test case

Fixes #2843

Screen.Recording.2025-11-21.at.12.34.13.mov

@gpbl gpbl requested a review from rodgobbi November 21, 2025 13:17
@gpbl gpbl merged commit 1dececb into main Nov 22, 2025
20 checks passed
@gpbl gpbl deleted the gpbl/issue2843 branch November 22, 2025 10:39
gpbl added a commit that referenced this pull request Nov 29, 2025
Fixes a test-only regression from #2851: jsdom allows focusing a disabled day, which drops the `disabled` attribute (keeps `aria-disabled`), so `toBeDisabled` fails and `onSelect` fires in tests even though browsers don’t allow focusing disabled buttons.
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.

Arrow keys don’t work for selecting a day if the focused day is disabled.

1 participant