[Bug]: Missing keyboard focus highlights and Escape key handling in Menu dropdown

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

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

@Siddh2024 がすでに取り組んでいます。

2026年11月22日 から。

  • #1452 @Siddh2024 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript, react

調査の方向性

The fix is scoped to @embeddedchat/ui-elements: Menu.styles.js holds the item/itemMobile style objects (hover only today) and Menu.js holds the dropdown open/close logic. Reproduce with cd packages/react && npx storybook dev -p 6006, opening the kebab menu in the chat header, then Tab and Escape. Done means focus-visible background matches hover and Escape closes the menu and returns focus to the trigger. Note an open pull request (#1452) already targets this, so check it before starting.

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

説明

bug
Description:

The Menu dropdown component in @embeddedchat/ui-elements lacks visual keyboard focus indicators and keyboard dismissal:

  1. No :focus / :focus-visible styles on MenuItem:
    MenuItem.styles.js only provides styles for mouse hover (&:hover). When navigating through menu options using Tab, the DOM element receives focus (via tabIndex="0"), but lacks any visual background highlight.
  2. Missing Escape key listener on Desktop:
    Pressing Escape when the desktop menu is open does not dismiss the menu or return focus to the trigger button.
Steps to reproduce:
  1. Start Storybook: cd packages/react && npx storybook dev -p 6006
  2. Click the three-dot kebab menu in the chat header.
  3. Press Tab repeatedly — observe that options do not visibly highlight or indicate focus.
  4. Press Escape — observe the menu remains open.
Expected behavior:
  • Tabbing through menu items should visibly highlight each option identically to the :hover state.
  • Pressing Escape should close the dropdown and return focus to the three-dot button.
Proposed Solution:

I would like to resolve this in @embeddedchat/ui-elements:

  • Add &:focus, &:focus-visible to item and itemMobile in Menu.styles.js.
  • Add an Escape key listener to Menu.js to dismiss the dropdown and restore trigger focus.

May I be assigned this issue?

主要言語
JavaScript
スター
171
フォーク
421
平均マージ
3日 6時間
マージ済み PR(30日)
4

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

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

RocketChat/EmbeddedChat のほかの issue

RocketChat/EmbeddedChat の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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