feat(tooltip): add pf-v6-tooltip element#3141
Conversation
🦋 Changeset detectedLatest commit: b52089b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Commitlint tests passed!More Info{
"valid": true,
"errors": [],
"warnings": [],
"input": "feat(tooltip): add pf-v6-tooltip element"
} |
✅ Deploy Preview for patternfly-elements ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Port tooltip to v6 design tokens and patterns. - FloatingDOMController with arrow element positioning - Cancellable TooltipShowEvent/TooltipHideEvent with reason enum - `trigger` attribute (IDREF) and property (Element ref) - `entry-delay`/`exit-delay` attributes (default 300ms) - `alignment` attribute (start/end/left/right) - `position`, `no-flip`, `flip-behavior` carried from v5 - `light-dark()` CSS fallbacks for inverse color scheme - `ariaDescribedByElements` wiring on show/hide - Escape key dismissal - 9 demos including playground, color-scheme, and element-ref trigger - 17 unit tests covering API, a11y, events, and cancellation Closes #3048 Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replaced by pf-v6-tooltip. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0b0a955 to
683110f
Compare
This comment has been minimized.
This comment has been minimized.
Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Cross-root
|
- Static document keydown listener for Escape (works with external triggers) - Screen reader announcer via static `role="status"` live region - `silent` attribute to opt out of announcements - Remove physical `'left'`/`'right'` from `TooltipAlignment`, keep logical `'start'`/`'end'` only - Remove `color-scheme: light dark` from `:host` so tooltip inherits container scheme and inverts correctly via `light-dark()` - Fix `user-select: initial` to `auto` - Why-comments on `ariaDescribedByElements` cross-root limitation and intentional bidirectional `visible` state - Improved JSDoc for cem health (66 -> 85): element description, slot a11y notes, CSS token refs, event detail shapes, added missing `--pf-v6-c-tooltip__arrow--BoxShadow` `@cssprop` Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- hide event firing and reason - focusin/focusout triggers - Element reference trigger property - flip-behavior attribute parsing - visible attribute (declarative) - slot overrides content attribute - cancel hide event - Escape key with external trigger (document listener) - silent attribute Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Demonstrate feature parity with React trigger modes using cancelable show/hide events: - click-trigger: click-to-toggle tooltip via preventDefault on hover - manual-trigger: checkbox-controlled tooltip via preventDefault on both hover and focus triggers Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Not a standalone demo on patternfly.org; alignment is covered by the options playground demo. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add static live-region announcer pattern for tooltip/popover content (from rh-tooltip) - Update cross-root ARIA section with WPT test link and spec references (WICG/aom#192, whatwg/html#5401, WICG/webcomponents#1086) Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
pf-v6-tooltipelement ported from v5 with v6 design tokensTooltipShowEvent/TooltipHideEventwithreasonenum for selective trigger preventiontriggerattribute (IDREF) and property (Element ref) for external trigger elementsentry-delay/exit-delay(default 300ms),alignment(start/end/left/right),position,no-flip,flip-behaviorlight-dark()CSS fallbacks for correct inverse color schemeariaDescribedByElementswiring between trigger and tooltip contentTest plan
alignmentattribute changes text-alignentry-delay/exit-delayin options playgroundno-flipdisables repositioning/review-a11y,/review-api,/review-demosCloses #3048