Skip to content

[DatePicker] Add keyboard support for selecting day, month, and year#20859

Merged
michelengelen merged 8 commits into
mui:masterfrom
michelengelen:bugfix/20632
Feb 19, 2026
Merged

[DatePicker] Add keyboard support for selecting day, month, and year#20859
michelengelen merged 8 commits into
mui:masterfrom
michelengelen:bugfix/20632

Conversation

@michelengelen
Copy link
Copy Markdown
Member

This PR fixes an accessibility issue where users on iOS with VoiceOver and a Bluetooth keyboard were unable to select dates using the Space or Enter keys when 'Pass Through' mode was active.

While arrow key navigation worked (due to explicit onKeyDown handling), the selection logic relied on the browser's default behavior of converting Space/Enter into a click event on a focused button. In iOS 'Pass Through' mode, this default event synthesis often fails to reach the React event system, even though specific key events (like arrows) are still dispatched.

Added explicit handling for Enter and Space keys within the onKeyDown listeners of the calendar components. This ensures that the selection callback is triggered directly by the key event, mirroring how navigation is already handled.

Fixes #20632

Signed-off-by: michel <jsnerdic@gmail.com>
@michelengelen michelengelen self-assigned this Jan 9, 2026
@michelengelen michelengelen added type: bug It doesn't behave as expected. accessibility a11y scope: pickers Changes related to the date/time pickers. labels Jan 9, 2026
@mui-bot
Copy link
Copy Markdown

mui-bot commented Jan 9, 2026

Deploy preview: https://deploy-preview-20859--material-ui-x.netlify.app/

Bundle size report

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 🔺+158B(+0.07%) 🔺+35B(+0.06%)
@mui/x-date-pickers-pro 🔺+158B(+0.05%) 🔺+43B(+0.05%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against c70a8e1

@michelengelen michelengelen changed the title [pickers] Add keyboard support for selecting day, month, and year [DatePicker] Add keyboard support for selecting day, month, and year Feb 17, 2026
…for consistency

Signed-off-by: michel <jsnerdic@gmail.com>
Copy link
Copy Markdown
Member

@flaviendelangle flaviendelangle left a comment

Choose a reason for hiding this comment

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

Make sense

Comment thread packages/x-date-pickers/src/MonthCalendar/MonthCalendar.tsx Outdated
michelengelen and others added 2 commits February 18, 2026 15:05
Co-authored-by: Flavien DELANGLE <flaviendelangle@gmail.com>
Signed-off-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com>
@michelengelen michelengelen enabled auto-merge (squash) February 18, 2026 14:05
@michelengelen michelengelen added needs cherry-pick The PR should be cherry-picked to master after merge. v8.x labels Feb 18, 2026
auto-merge was automatically disabled February 18, 2026 14:35

Pull request was closed

@michelengelen michelengelen deleted the bugfix/20632 branch February 18, 2026 14:35
@michelengelen michelengelen restored the bugfix/20632 branch February 18, 2026 14:35
@michelengelen michelengelen reopened this Feb 18, 2026
@michelengelen michelengelen merged commit 0d23231 into mui:master Feb 19, 2026
22 checks passed
@michelengelen michelengelen deleted the bugfix/20632 branch February 19, 2026 14:22
@github-actions
Copy link
Copy Markdown
Contributor

Cherry-pick PRs will be created targeting branches: v8.x

github-actions Bot pushed a commit that referenced this pull request Feb 19, 2026
…20859)

Signed-off-by: michel <jsnerdic@gmail.com>
Signed-off-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com>
Co-authored-by: Flavien DELANGLE <flaviendelangle@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility a11y needs cherry-pick The PR should be cherry-picked to master after merge. scope: pickers Changes related to the date/time pickers. type: bug It doesn't behave as expected. v8.x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[pickers] DatePicker cannot select date with VoiceOver and Full Keyboard Access in Pass Through mode

3 participants