Skip to content

Commit

Permalink
Recompute the label when id changes
Browse files Browse the repository at this point in the history
Without this, `aria-labelled-by` is never added to the Tooltip child.
  • Loading branch information
MidhunSureshR committed Oct 2, 2024
1 parent 335885e commit bbab33b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Tooltip/useTooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export function useTooltip({
},
}
: {},
[purpose],
[purpose, labelId, captionId],
);

const interactions = useInteractions([hover, focus, dismiss, role, label]);
Expand Down

0 comments on commit bbab33b

Please sign in to comment.