angular / angular/components

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

Ouverte
#33,683 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Accessibility area: material/datepicker P3
Langage dominant
TypeScript
Étoiles
25k
Forks
6.8k
Merge moyen
1 j 8 h
PR mergées (30 j)
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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par les exemples de datepicker à l’adresse https://material.angular.dev/components/datepicker/examples et reproduisez la navigation au clavier dans Chrome ou Firefox avec NVDA ou le lecteur d’écran de Windows. Suivez la manière dont les événements des touches fléchées sont gérés en mode navigation ; le travail est terminé lorsque la navigation entre les jours fonctionne sans devoir passer manuellement en mode focus, tout en continuant à fonctionner sans lecteur d’écran.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
angular, typescript
Domaine
accessibility, frontend
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Active
Clarté
Plutôt claire
Accessibilité débutants
58/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.