feat(tooltip)!: port to pf-v6-tooltip#3141
Conversation
🦋 Changeset detectedLatest commit: 782a0d3 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)!: port to `pf-v6-tooltip`"
} |
✅ Deploy Preview for patternfly-elements ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
0b0a955 to
683110f
Compare
This comment has been minimized.
This comment has been minimized.
Cross-root
|
zeroedin
left a comment
There was a problem hiding this comment.
Rename PR feat(tooltip)!: port to pf-v6-tooltip
pf-v6-tooltip
|
NB: i found no instances of react See generated report below. I don't endorse every recommendation here, this is just for reference. Tooltip Audit Summary2296 instances across 105/160 repos | 48 spread usages Props: PF React vs Actual Usage
Web Component API RecommendationsCore attributes: Boolean attributes: Events: Drop: 48 spread usages may pass unlisted props -- worth spot-checking those repos. |
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>
Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- 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>
…ip has `silent` attr
I can confirm from manual testing that the tooltip content is still available without describedby, but SR announcement today depends on the live-region workaround, not role="tooltip" alone. I pushed some docs changes to further note/document the limitations of |
…sers to use/prefer popover API
|
Checked the demos with the usual screen reader suspects. Two notes: The click trigger demo tooltip displays on keyboard focus, not just on click. The Windows screen readers read the tooltip content when this happens. Mac VoiceOver does not read the tooltip content in this demo ever--neither on click nor on focus. The manual trigger demo reads the tooltip when the trigger checkbox is checked, but does not also read it when the button associated with the tooltip receives focus. Not sure if this is intended or not, but thought I'd point it out. |
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