cpsTooltip: can't be dismissed with Escape or hovered over (WCAG 1.4.13)

クローズ
#916 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

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

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

2026年11月3日 から。

  • #931 @fateeand による — マージ済み

評価

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

調査の方向性

Start in projects/cps-ui-kit/src/lib/directives/cps-tooltip/cps-tooltip.directive.ts: the host bindings around lines 38-48, onMouseLeave(), and _positionAndShow(), where popup listeners are added only for persistent tooltips. Add an Escape handler for hover, focus and trigger cases, and mouseenter/mouseleave handling on the popup so a pending hide is cancelled. Done when the Playwright spec in playwright/cps-ui-kit/directives/cps-tooltip.spec.ts covers Escape dismissal and hovering over the tooltip, and persistent, click and focus behaviour is unchanged.

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

説明

accessibility bug library

Problem

cpsTooltip doesn't meet WCAG 1.4.13 (Content on Hover or Focus) with its default settings (tooltipOpenOn="hover", tooltipPersistent=false):

  • Not dismissible: pressing Escape doesn't close an open tooltip. Users have to move the pointer or focus away from the trigger to hide content that may cover other parts of the page.
  • Not hoverable: moving the pointer from the trigger onto the tooltip closes it after tooltipCloseDelay (300 ms). Users can't keep the tooltip open while reading it or while zooming in on it.

Found in AUL on the Dashboard: truncated domain-card titles show the full name in a cpsTooltip. On hover or keyboard focus, Escape leaves the tooltip open, and moving the pointer onto the tooltip makes it disappear.

Where

  • projects/cps-ui-kit/src/lib/directives/cps-tooltip/cps-tooltip.directive.ts:38-48: the host bindings have no Escape key handler.
  • cps-tooltip.directive.ts onMouseLeave(): always schedules _destroyTooltip for non-persistent tooltips.
  • cps-tooltip.directive.ts _positionAndShow(): popup listeners (focusout, keydown) are only added for persistent tooltips. None of them are mouseenter/mouseleave listeners, so hovering over the popup can't cancel the pending hide.

Acceptance criteria

  • Pressing Escape while the trigger or the tooltip has focus, or while the tooltip is shown on hover, closes the tooltip. Focus stays where it was, and nothing else on the page handles that Escape press.
  • Moving the pointer from the trigger onto a visible tooltip keeps it open. It closes after tooltipCloseDelay once the pointer leaves both the trigger and the tooltip.
  • The current behaviour for persistent, click-opened and focus-opened tooltips stays the same, apart from the new Escape dismissal.
  • Playwright tests in playwright/cps-ui-kit/directives/cps-tooltip.spec.ts cover Escape dismissal and hovering over the tooltip.
主要言語
TypeScript
スター
9
フォーク
8
平均マージ
1日 1時間
マージ済み PR(30日)
23

環境構築

このプロジェクトには開発コンテナ、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 を短くまとめたダイジェスト。