bug(Listbox): Can not select first option with Enter after calling .goToFirst() (@angular/aria)
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
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
When calling `.goToFirst()` the first option is set active. But it is not possible to select it with _Enter_. If the user hits _arrow down_ one time you can select the first option. But my whole reason for calling `.goToFirst()` is so the user do not need arrows when first option is the one they want.
I suspect an underlying keyboard manager is not being synced when calling `.goToFirst()'
### Reproduction
StackBlitz link: https://stackblitz.com/edit/go-to-first-issue-angular-aria-wpcbw3sz?file=src%2FApp.ts
Steps to reproduce:
1. Load stackblitz
2. Hit enter
Hitting enter should trigger en alert with the text "Option 0", but it does not happen
### Expected Behavior
When calling `.goToFirst()` the first option is selected and hitting Enter on the keyboard will select it.
### Actual Behavior
Nothing happens when hitting Enter
### Environment
- Angular: 21.1.3
- CDK/Material: 21.1.3
- Browser(s): Edge, Firefox
- Operating System (e.g. Windows, macOS, Ubuntu): Windows, Macos
Guía de contribución
Línea de trabajo
Comienza con la reproducción vinculada de StackBlitz, especialmente con src/App.ts, y reproduce la secuencia .goToFirst() y luego Enter. Investiga la sospechada sincronización de keyboard-manager y verifica que pulsar Enter después de desplazarse a la primera opción active un alert que contenga "Option 0" sin requerir Arrow Down.
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
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100