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

Table, Tree table: focus is lost after closing a column filter with Apply, Clear or Close

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

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

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

2026年10月26日 から。

  • #898 @fateeand による — オープン

評価

この issue はまだ評価されていません。

説明

bug library

Problem

When a column filter menu is opened from its filter button in the header cell, closing it with a button inside the menu sends focus to <body>. Keyboard users then have to Tab from the top of the page to get back to the table, and screen readers lose their place. (WCAG 2.4.3 Focus Order.)

Pressing Esc already does the right thing: focus goes back to the filter button. Apply, Clear and Close (×) should do the same.

Steps to reproduce

  1. Tab to a column's filter button ("Open filter menu") and press Enter.
  2. Close the menu in one of these ways:
    • Apply (filterShowApplyButton is true), or
    • Clear, when filterHideOnClear is true, or
    • Close filter (×) in the menu header.
  3. Check document.activeElement.

Actual: <body>, with no focus ring anywhere.
Expected: the column's filter button, with its focus ring for keyboard users. This is what Esc does now.

Seen in cps-ui-kit 21.30.1. Both cps-table (cpsTColFilter) and cps-tree-table (cpsTTColFilter) render the same table-column-filter component, so both are affected.

Cause

applyFilter(), clearFilter() (with hideOnClear) and onCloseClick() all call hide() → columnFilterMenu.hide(). That path doesn't return focus to the trigger button. The focused button is inside the menu, so when the menu closes, focus is lost.

Proposal

When the menu is closed from inside (Apply, Clear with hideOnClear, Close), move focus back to the filter button (.cps-table-col-filter-menu-button) the same way Esc does. Use CPS_FOCUS_SERVICE.focusElement(button, isKeyboard()) so the ring shows only for keyboard users. Do this only when focus was inside the menu, so clicking outside the menu doesn't pull focus back.

主要言語
TypeScript
スター
9
フォーク
7
平均マージ
1日 5時間
マージ済み PR(30日)
7

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

AbsaOSS/cps-shared-ui のほかの issue

AbsaOSS/cps-shared-ui の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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