diff --git a/.changeset/wicked-rings-prove.md b/.changeset/wicked-rings-prove.md new file mode 100644 index 00000000000..28b49915491 --- /dev/null +++ b/.changeset/wicked-rings-prove.md @@ -0,0 +1,5 @@ +--- +"@primer/react": patch +--- + +Tooltip2: Render tooltip element as `span` instead of `div` diff --git a/packages/react/src/TooltipV2/Tooltip.tsx b/packages/react/src/TooltipV2/Tooltip.tsx index acb39a9b90d..af1c76bb316 100644 --- a/packages/react/src/TooltipV2/Tooltip.tsx +++ b/packages/react/src/TooltipV2/Tooltip.tsx @@ -19,7 +19,7 @@ const animationStyles = ` animation-delay: 0s; ` -const StyledTooltip = styled.div` +const StyledTooltip = styled.span` /* Overriding the default popover styles */ display: none; &[popover] { diff --git a/packages/react/src/__tests__/__snapshots__/TextInput.test.tsx.snap b/packages/react/src/__tests__/__snapshots__/TextInput.test.tsx.snap index eac498de8a1..1f42c1e6019 100644 --- a/packages/react/src/__tests__/__snapshots__/TextInput.test.tsx.snap +++ b/packages/react/src/__tests__/__snapshots__/TextInput.test.tsx.snap @@ -2213,7 +2213,7 @@ exports[`TextInput renders trailingAction icon button 1`] = ` /> -
Icon label -
+ `; @@ -3194,7 +3194,7 @@ exports[`TextInput renders trailingAction text button with a tooltip 1`] = ` - + `;