diff --git a/src/components/products/ProductCard/ProductCard.test.tsx b/src/components/products/ProductCard/ProductCard.test.tsx index 5741c8b..cb6319c 100644 --- a/src/components/products/ProductCard/ProductCard.test.tsx +++ b/src/components/products/ProductCard/ProductCard.test.tsx @@ -37,11 +37,14 @@ describe('ProductCard', () => { expect(screen.getByText('Feature 2')).toBeInTheDocument() }) - it('renders link to product page', () => { + it('renders entire card as clickable link to product page', () => { render() - expect(screen.getByRole('link', { name: /learn more/i })).toHaveAttribute( - 'href', - '/products/vibes', - ) + // Link contains all card content, so its accessible name includes "Vibes" + const link = screen.getByRole('link', { name: /vibes/i }) + expect(link).toHaveAttribute('href', '/products/vibes') + // Verify the card content is inside the link (screen readers will announce this) + expect(link).toContainElement(screen.getByText('Vibes')) + expect(link).toContainElement(screen.getByText('Remote control for Claude Code')) + expect(link).toContainElement(screen.getByText('Learn More →')) }) }) diff --git a/src/components/products/ProductCard/ProductCard.tsx b/src/components/products/ProductCard/ProductCard.tsx index bb6aaca..86a6b38 100644 --- a/src/components/products/ProductCard/ProductCard.tsx +++ b/src/components/products/ProductCard/ProductCard.tsx @@ -23,37 +23,36 @@ export function ProductCard({ className, }: ProductCardProps) { return ( - - {image && ( - - - - )} - - - - - - - {name} - - {tagline} - - - {features.map((feature) => ( - - • - {feature} - - ))} - - - Learn More → - - + + + {image && ( + + + + )} + + + + + + + {name} + + {tagline} + + + {features.map((feature) => ( + + • + {feature} + + ))} + + + Learn More → + + + ) }