Skip to content

Commit 1e69292

Browse files
committed
minor: fix label and title on docs popover button
1 parent ccfa5a5 commit 1e69292

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

app/components/DocsPopover.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,21 @@ export const DocsPopoverLink = ({ href, linkText }: DocsPopoverLinkProps) => (
3636
)
3737

3838
type DocsPopoverProps = {
39-
heading: React.ReactNode
39+
heading: string
4040
icon: JSX.Element
4141
links: Array<DocsPopoverLinkProps>
4242
summary: string
4343
}
4444

4545
export const DocsPopover = ({ heading, icon, summary, links }: DocsPopoverProps) => {
46+
const title = `Learn about ${heading}`
4647
return (
4748
<Popover>
48-
<PopoverButton className={cn(buttonStyle({ size: 'sm', variant: 'ghost' }), 'w-8')}>
49-
<Info16Icon aria-label="Links to docs" className="shrink-0" />
49+
<PopoverButton
50+
className={cn(buttonStyle({ size: 'sm', variant: 'ghost' }), 'w-8')}
51+
title={title}
52+
>
53+
<Info16Icon aria-hidden className="shrink-0" />
5054
</PopoverButton>
5155
<PopoverPanel
5256
// popover-panel needed for enter animation
@@ -56,7 +60,7 @@ export const DocsPopover = ({ heading, icon, summary, links }: DocsPopoverProps)
5660
<div className="px-4">
5761
<h2 className="mt-4 flex items-center gap-1 text-sans-md">
5862
<div className="mr-1 flex items-center text-accent-secondary">{icon}</div>
59-
Learn about {heading}
63+
{title}
6064
</h2>
6165
<p className="mb-3 mt-2 text-sans-md text-default">{summary}</p>
6266
</div>

test/e2e/docs-popover.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ test('Show / hide contextual help docs links', async ({ page }) => {
1717
await expect(managingDisksLink).toBeHidden()
1818

1919
// open the contextual help docs links
20-
await page.getByLabel('Links to docs').click()
20+
await page.getByLabel('Learn about disks').click()
2121
await expect(learnAbout).toBeVisible()
2222
await expect(managingDisksLink).toBeVisible()
2323

0 commit comments

Comments
 (0)