Skip to content

Commit ea0523c

Browse files
authored
Fix the Connect button to show the text. (supabase#45646)
The connect button was missing its text Before: <img width="833" height="244" alt="Screenshot 2026-05-06 at 17 46 23" src="https://github.com/user-attachments/assets/c03e972f-bef6-4bd7-8819-dd51509c58eb" /> After: <img width="678" height="208" alt="Screenshot 2026-05-06 at 17 46 58" src="https://github.com/user-attachments/assets/5b020017-133e-47c3-8138-925c27299665" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved screen reader accessibility in the Connect button by refining how text visibility is handled based on button display mode. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 93ef20c commit ea0523c

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

apps/studio/components/interfaces/ConnectButton/ConnectButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const ConnectButton = ({
4747
},
4848
}}
4949
>
50-
<span className={cn({ 'sr-only': !iconOnly })}>Connect</span>
50+
<span className={cn({ 'sr-only': iconOnly })}>Connect</span>
5151
</ButtonTooltip>
5252
)
5353
}

apps/studio/components/ui/ButtonTooltip.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ export const ButtonTooltip = forwardRef<
1010
}
1111
}
1212
}
13-
>(({ ...props }, ref) => {
13+
>(({ tooltip, className, ...props }, ref) => {
1414
return (
1515
<Tooltip>
1616
<TooltipTrigger asChild>
17-
<Button ref={ref} {...props} className={cn(props.className, 'pointer-events-auto')}>
17+
<Button ref={ref} {...props} className={cn(className, 'pointer-events-auto')}>
1818
{props.children}
1919
</Button>
2020
</TooltipTrigger>
21-
{props.tooltip.content.text !== undefined && (
22-
<TooltipContent {...props.tooltip.content}>{props.tooltip.content.text}</TooltipContent>
21+
{tooltip.content.text !== undefined && (
22+
<TooltipContent {...tooltip.content}>{tooltip.content.text}</TooltipContent>
2323
)}
2424
</Tooltip>
2525
)

0 commit comments

Comments
 (0)