bug(MatTree): MatTree with interactive elements in each row is not keyboard accessible using a screenreader
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
#### Reproduction
Use StackBlitz to reproduce your issue:
- Components: https://angular-p4bmmy-zxpv6j.stackblitz.io
Steps to reproduce:
1. Navigate to StackBlitz link above on a Windows machine
2. Use the keyboard to interact with the tree by tabbing to a node, pressing enter or space to expand it, then tabbing to a nested checkbox and selecting it. Do not use the mouse.
3. Enable JAWS or NVDA screen reader
4. Attempt to repeat step 2, using the keyboard to interact with the tree
5. Manually expand the tree using the mouse then tab through the elements until you get to a nested checkbox. Press space or enter to select the checkbox.

#### Expected Behavior
Enabling a screen reader should not change the behavior when interacting with the tree using a keyboard. With a screen reader enabled, I should be able to expand a row, tab to a nested checkbox, and select the checkbox using only the keyboard.
#### Actual Behavior
Hitting space or enter appears to send the click event to the first encountered input element, rather than the focused element. In the linked example, this can be either the textbox above the tree or an unfocused checkbox, depending on how you tab through the list. Either way, the focused element doesn't seem to receive the event.
#### Environment
JAWS v2021.2102.34 / NVDA v2020.4 (reproducible with both)
Windows 10 Enterprise Version
Chrome Version 89.0.4389.114
Also tested with Firefox Version 87.0, but was not able to reproduce on FF
Guía de contribución
Línea de trabajo
Comience con la reproducción vinculada de StackBlitz y repita los pasos usando solo el teclado en Chrome en Windows con JAWS o NVDA. Compare el comportamiento con y sin el lector de pantalla, incluida la casilla de verificación anidada y el cuadro de texto situado encima del árbol. La tarea estará terminada cuando el elemento enfocado reciba Enter o Space y el árbol siga siendo accesible mediante el teclado con un lector de pantalla, conservando el comportamiento informado en Firefox.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, typescript
- Área
- accessibility, frontend
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100