Skip to content

feat: add opt-in grid cell interaction - #3022

Draft
gpbl wants to merge 1 commit into
mainfrom
fix/nvda-day-cell-focus
Draft

gpbl wants to merge 1 commit into
mainfrom
fix/nvda-day-cell-focus

Conversation

@gpbl

@gpbl gpbl commented Sep 30, 2026

Copy link
Copy Markdown
Owner

NVDA in Chrome can announce a date twice when focus moves to a button inside a grid cell. This adds an opt-in dayInteraction="cell" mode that focuses the cell directly, while keeping dayInteraction="button" as the default.

Refs #3019.

What Changed

  • Add cell focus, arrow navigation, and Enter/Space activation for single, multiple, range, and custom selection.
  • Use shorter date names, expose weekday headers, associate grids with month captions, and convey selection and today through ARIA states. Preserve full date context for outside dates and hidden weekday headers.
  • Add noninteractive DayContent customization and localizable labelKeyboardHelp instructions announced on grid entry.
  • Add the CellInteraction comparison example, accessibility documentation, and regression coverage.

Review Notes

  • Existing button markup, labels, and DayButton customization remain the default. The root role is unchanged.
  • Cell mode reuses the day_button styling slot. Consumers opting in with custom button-tag selectors or custom components should follow the migration guidance in the accessibility guide.
  • New component and label map entries are optional to preserve existing type assignments. Caption IDs include a fallback for React versions without useId.
  • Keep this PR in draft pending manual NVDA/Chrome and VoiceOver testing of the final opt-in implementation. Open the examples app with ?example=CellInteraction to compare modes.

Validation

  • pnpm lint
  • pnpm typecheck
  • pnpm test --runInBand: 223 suites passed; 1,160 tests passed, 1 todo; 3 snapshots passed.
  • Final focused cell-interaction and ID-fallback tests: 70 passed.
  • pnpm --filter examples-app build

@changeset-bot

changeset-bot Bot commented Sep 30, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 663b9ae

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

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