bug(DatePicker): keyboard navgiation breaks when a screen reader is used
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 91
描述
### 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
贡献指南
调研方向
从 https://material.angular.dev/components/datepicker/examples 中的 datepicker 示例开始,并使用 NVDA 或 Windows 的屏幕阅读器在 Chrome 或 Firefox 中复现键盘导航。跟踪箭头键事件在浏览模式下的处理方式;完成的标准是无需手动切换到焦点模式即可进行日期导航,同时在不使用屏幕阅读器时导航仍然有效。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- accessibility, frontend
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 58/100