bug(aria/accordion): Enter/Space inside a panel toggles the accordion instead of activating the focused element
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- angular, typescript
- Área
- accessibility, frontend
Línea de trabajo
Empieza por el controlador keydown mencionado en el issue en src/aria/private/accordion/accordion.ts y compara el destino de sus eventos con el del controlador click. Reproduce el comportamiento con el StackBlitz enlazado, especialmente Enter y Space en los controles de los paneles y Home en el campo de entrada. El trabajo estará terminado cuando esas teclas funcionen en el contenido de los paneles y los controles de teclado del accordion sigan funcionando en los triggers.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
Pressing Enter on a link (or Space on a button) inside an expanded ngAccordionPanel collapses the panel instead of activating the link/button.
ngAccordionGroup handles keydown for the whole group, including panel content, and calls preventDefault() on Enter/Space, so the focused element never gets activated. Arrow keys and Home/End are affected too, e.g. Home in an input inside a panel moves focus to the trigger.
The click handler only reacts to events coming from a trigger (_findTriggerPattern), the keydown handler doesn't check that:
https://github.com/angular/components/blob/952685f9370ba718f832d745512db7c9a04e1bcd/src/aria/private/accordion/accordion.ts#L73-L97
Reproduction
StackBlitz link: https://stackblitz.com/edit/z5sxyaq6?file=src%2Fmain.ts
Steps to reproduce:
- Expand "Section 1".
- Tab to "Link inside panel" or "Button inside panel" and press Enter / Space.
- Expand it again, click into the input and press Home.
Expected Behavior
The link/button is activated (shows up in the log) and the panel stays open. Home moves the caret in the input.
Actual Behavior
The panel collapses, nothing is activated. Home moves focus to the trigger.
Environment
- Angular: 22.2.3
- CDK/Material: @angular/aria 22.2.4 (also 22.1.6)
- Browser(s): Chrome 155
- Operating System (e.g. Windows, macOS, Ubuntu): Linux
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 3 d 7 h
- PR fusionados (30 d)
- 59
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de angular/components
-
bug(aria/combobox): keys pressed back to back are lost; only the last one reaches the popupPosiblemente ocupada @drakeo338 la tomó hace 7 días. Abiertoarea: aria/combobox gemini-triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
angular/components#33973 ·
Los mantenedores suelen responder en 1 día
-
bug(material/sort): hover hint arrow on an unsorted header shows the active sort direction, not the resulting direction after click.Posiblemente ocupada @lekhmanrus la tomó hace 19 días. Abiertoarea: material/sort P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
angular/components#33933 ·
Los mantenedores suelen responder en 1 día
-
bug(mat-date-picker): month shown twice in date pickerPosiblemente ocupada @PreethiPantangi la tomó hace 36 días. Abiertoarea: material/datepicker P4
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
angular/components#33763 · 2 comentarios · 3 reacciones ·
Los mantenedores suelen responder en 1 día
-
Bug in table.scss footer cell height: unset instead of footer row height unsetPosiblemente ocupada @minwookshin la tomó hace 23 días. Abiertoarea: material/table P4
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
angular/components#33709 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
docs-bug(Table): Add example with `rowspan`Posiblemente ocupada @BHUVANSH855 la tomó hace 104 días. Abiertoarea: material/table docs P4
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
angular/components#33455 ·
Los mantenedores suelen responder en 1 día
Todos los issues de angular/components
Issues similares
-
agent-reported area/react bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Nimblesite/SharpLsp#510 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
backend refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
NIAEFEUP/tts#927 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
callstackincubator/react-native-harness#296 ·
Los mantenedores suelen responder en 1 día