feat(web-components): add slot for an icon in ic-tooltip#4260
feat(web-components): add slot for an icon in ic-tooltip#4260GCHQDeveloper416 wants to merge 3 commits intodevelopfrom
Conversation
|
View your branch deployment here: https://mi6.github.io/ic-ui-kit/branches/734-tooltip-icon/web-components |
6bb1730 to
c7b79ec
Compare
|
Cypress visual tests failed. |
55c7a47 to
72d64a4
Compare
72d64a4 to
d906a10
Compare
6427e87 to
74d063f
Compare
f7c8cbc to
4e114ef
Compare
| } | ||
|
|
||
| :host(.ic-tooltip.ic-tooltip-with-icon) ::slotted([slot="tooltip-icon"]) { | ||
| width: var(--ic-space-md); |
GCHQ-Developer-299
left a comment
There was a problem hiding this comment.
Will review once suggestion about top margin is implemented
ef4ac4b to
9425478
Compare
GCHQ-Developer-299
left a comment
There was a problem hiding this comment.
Spotted a couple of things in the storybooks
| theme: "inherit", | ||
| fixedPositioning: false, | ||
| tooltipIconSlot: "tooltip-icon", | ||
| tooltipIconAltText: "", |
There was a problem hiding this comment.
Can you please give Playground with Icon it's own set of default args? Currently these extra fields are showing up on the regular Playground, where they're not functional
| </svg> | ||
| <button aria-describedby="ic-tooltip-1">Native</button> | ||
| </IcTooltip> | ||
| <IcTooltip |
There was a problem hiding this comment.
I'm not sure what's going on here, but the IcButton tooltip doesn't update it's label or icon alt text (the native button is fine)
Screen.Recording.2026-02-24.at.08.46.38.mov
There was a problem hiding this comment.
I have tried to replicate it off develop and the same issue appears when changing the label - screen reader reads the updated label for the first button but the second does not update for screen reader until manually refreshed. Maybe needs another ticket?
d6a7326 to
1ab3b55
Compare
dff9c0e to
090e008
Compare
Add slot for icon within tooltip. Prop for alt-text. Update to jest tests. Update to storybook feat(web-components): tooltip icon playground updated with own args Tooltip icon playground updated with own args feat(web-components): add slot for icon on tooltip Add slot for icon within tooltip. Prop for alt-text. Update to jest tests. Update to storybook feat(web-components): tooltip icon playground updated with own args Tooltip icon playground updated with own args feat(web-components): removal of extra icon-args removal of extra icon-args
update to docs
Add react stories and cypress tests for tooltip feat(react): update to default args for react storybook tooltip playground with icon in storybook has own default args
090e008 to
658bf95
Compare


Summary of the changes
Add slot for icon within tooltip. Tooltip icon stays on left and aligned with first line of text. Alt-text prop enables text to be added for the icons for screenreaders if alt text is given.

Related issue
#734
Checklist
General
Testing
Accessibility
Resize/zoom behaviour
System modes
Testing content extremes