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

Chiusa
#916 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@fateeand ci sta già lavorando.

Dal 3/11/2026.

  • #931 di @fateeand — integrata

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
70/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
angular, typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
TypeScript
Stelle
9
Fork
8
Merge medio
1g 1h
PR unite (30g)
23

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di AbsaOSS/cps-shared-ui

Tutte le issue di AbsaOSS/cps-shared-ui

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.