angular / angular/components

bug(DatePicker): keyboard navgiation breaks when a screen reader is used

Open
#33,683 5 comments 0 reactions 0 assignees View on GitHub
Accessibility area: material/datepicker P3
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

When you open the date picker you can easily use the arrow keys to navigate between the days of the month.
But if you use a screen reader (tested with nvda and the integrated one from windows) the arrow keys won't work properly anymore.

The reason is because the screen reader switches to browse mode instead of focus mode and catches the keyboard events. If you switch manually to the focus mode (in nvda its the nvda key + space) it works again.

### Reproduction

Just try it in one of the examples at the official site https://material.angular.dev/components/datepicker/examples
- without screen reader: keyboard navigation works
- with screen reader: keyboard navigation won't work - you have to switch manually to focus mode

### Expected Behavior

I expect the keyboard navigation to work regardless if a screen reader is active or not. It should also not be needed to manually switch to focus mode

### Actual Behavior

- without screen reader: keyboard navigation works
- with screen reader: keyboard navigation won't work - you have to switch manually to focus mode

### Environment

- Angular: 22
- CDK/Material: 22
- Browser(s): Chrome, Firefox
- Operating System: Windows 11

Contributor guide

Open the contributing guide

Research direction

Start with the datepicker examples at https://material.angular.dev/components/datepicker/examples and reproduce keyboard navigation in Chrome or Firefox with NVDA or Windows' screen reader. Trace how arrow-key events are handled in browse mode; done means navigating days works without manually switching to focus mode, while navigation still works without a screen reader.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
accessibility, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.