Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

bug(Listbox): Can not select first option with Enter after calling .goToFirst() (@angular/aria)

オープン
#32,762 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
angular, typescript

調査の方向性

リンクされている StackBlitz の再現手順、特に src/App.ts から始め、.goToFirst() の後に Enter を押すシーケンスを再現してください。keyboard-manager の同期に関する疑いを調査し、最初のオプションに移動した後に Enter を押すと、Arrow Down を必要とせずに "Option 0" を含む alert が発生することを確認してください。

索引モデルが issue の本文から書いたものです。

説明

area: aria/listbox P3
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
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 5時間
マージ済み PR(30日)
67

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

angular/components のほかの issue

angular/components の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。