Skip to content

Commit

Permalink
fix: Add back in existing code
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel.carrera committed Jan 30, 2025
1 parent ebac934 commit ddc4f10
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/react/tooltip/lib/useTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ export function useTooltip<T extends Element = Element>({
onBlur: onHide,
};

// remove `aria-describedby` if undefined to not override what's provided
if (targetProps['aria-describedby'] === undefined) {
delete targetProps['aria-describedby'];
}

return {
/** Mix these properties into the target element. **Must be an Element** */
targetProps,
Expand Down

0 comments on commit ddc4f10

Please sign in to comment.