bug(Listbox): Can not select first option with Enter after calling .goToFirst() (@angular/aria)
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 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 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
コントリビューションガイド
調査の方向性
リンクされている StackBlitz の再現手順、特に src/App.ts から始め、.goToFirst() の後に Enter を押すシーケンスを再現してください。keyboard-manager の同期に関する疑いを調査し、最初のオプションに移動した後に Enter を押すと、Arrow Down を必要とせずに "Option 0" を含む alert が発生することを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- accessibility, frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100