diff --git a/client/src/__tests__/HomePage.test.tsx b/client/src/__tests__/HomePage.test.tsx index 83335f5..28a0da3 100644 --- a/client/src/__tests__/HomePage.test.tsx +++ b/client/src/__tests__/HomePage.test.tsx @@ -5,7 +5,7 @@ describe('Home Page', () => { it('renders the home page heading', () => { render() - expect(screen.getByRole('heading', { name: /Incia & Arvin/i, level: 2 })).toBeInTheDocument() + expect(screen.getByRole('heading', { name: /Incia & Arvin/i, level: 1 })).toBeInTheDocument() }) it('displays save the date section', () => { @@ -17,6 +17,36 @@ describe('Home Page', () => { it('contains RSVP button', () => { render() - expect(screen.getByRole('link', { name: /rsvp now/i })).toBeInTheDocument() + expect(screen.getByRole('link', { name: /RSVP for Incia and Arvin's wedding/i })).toBeInTheDocument() + }) + + it('has proper accessibility features', () => { + render() + + // Check for skip link + expect(screen.getByRole('link', { name: /Skip to main content/i })).toBeInTheDocument() + + // Check for main landmark + expect(screen.getByRole('main')).toBeInTheDocument() + + // Check for proper heading hierarchy + expect(screen.getByRole('heading', { level: 1, name: /Incia & Arvin/i })).toBeInTheDocument() + expect(screen.getByRole('heading', { level: 2, name: /Save the Date/i })).toBeInTheDocument() + }) + + it('has descriptive alt texts for images', () => { + render() + + // Check for more descriptive alt texts in story section + expect(screen.getByAltText(/Incia and Arvin as students at American International School/i)).toBeInTheDocument() + expect(screen.getByAltText(/The magical Tuscany proposal moment/i)).toBeInTheDocument() + }) + + it('includes structured timing information', () => { + render() + + // Check for enhanced timing information in the Save the Date section + expect(screen.getByText(/6:00 PM Bangladesh Standard Time/i)).toBeInTheDocument() + expect(screen.getByText(/📍 Dhaka, Bangladesh/i)).toBeInTheDocument() }) }) \ No newline at end of file diff --git a/client/src/app/globals.css b/client/src/app/globals.css index 5edc907..6a862d4 100644 --- a/client/src/app/globals.css +++ b/client/src/app/globals.css @@ -335,6 +335,57 @@ html { font-family: var(--font-serif); } +/* Accessibility improvements */ +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +.focus\:not-sr-only:focus { + position: static; + width: auto; + height: auto; + padding: 0.5rem 1rem; + margin: 0; + overflow: visible; + clip: auto; + white-space: normal; +} + +/* Enhanced focus indicators */ +.focus\:ring-2:focus { + box-shadow: 0 0 0 2px var(--color-primary); +} + +.focus\:ring-offset-2:focus { + box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--color-primary); +} + +/* Improved touch targets for mobile - WCAG 2.1 compliance */ +@media (max-width: 640px) { + button, a, [role="button"], input, select, textarea { + min-height: 44px; + min-width: 44px; + } +} + +/* Reduce motion for users who prefer it - Accessibility best practice */ +@media (prefers-reduced-motion: reduce) { + *, *::before, *::after { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + scroll-behavior: auto !important; + } +} + /* Utilities */ .touch-pan-zoom { touch-action: pan-x pan-y pinch-zoom; diff --git a/client/src/app/layout.tsx b/client/src/app/layout.tsx index eb581e1..2c654c4 100644 --- a/client/src/app/layout.tsx +++ b/client/src/app/layout.tsx @@ -21,24 +21,36 @@ const playfair = Playfair_Display({ }); export const metadata: Metadata = { - title: "Incia & Arvin's Wedding", - description: "Join us in celebrating the love story of Incia & Arvin - from childhood friends to forever partners. Dhaka, Bangladesh with celebrations continuing in Phu Quoc, Vietnam.", - keywords: ["wedding", "Incia", "Arvin", "Dhaka", "Vietnam", "celebration"], - authors: [{ name: "CodeStorm Hub" }], - creator: "CodeStorm Hub", + title: "Incia & Arvin's Wedding - December 16, 2025", + description: "Join us in celebrating the love story of Incia & Arvin - from childhood friends at AISD to forever partners. Wedding ceremony in Dhaka, Bangladesh on December 16, 2025, with celebrations continuing in Phu Quoc, Vietnam.", + keywords: ["wedding", "Incia", "Arvin", "Dhaka", "Vietnam", "celebration", "AISD", "love story", "December 2025"], + authors: [{ name: "Incia & Arvin" }], + creator: "Incia & Arvin", openGraph: { - title: "Incia & Arvin's Wedding", - description: "Join us in celebrating the love story of Incia & Arvin", + title: "Incia & Arvin's Wedding - December 16, 2025", + description: "Join us in celebrating the love story of Incia & Arvin - from childhood friends to forever partners", type: "website", locale: "en_US", siteName: "Incia & Arvin's Wedding", + images: [ + { + url: "/images/og-wedding-image.jpg", + width: 1200, + height: 630, + alt: "Incia & Arvin's Wedding", + }, + ], }, twitter: { card: "summary_large_image", - title: "Incia & Arvin's Wedding", + title: "Incia & Arvin's Wedding - December 16, 2025", description: "Join us in celebrating the love story of Incia & Arvin", + images: ["/images/og-wedding-image.jpg"], }, robots: "index, follow", + alternates: { + canonical: "https://arvinwedsincia.com", + }, }; // Separate viewport export as required by Next.js 13+ @@ -52,8 +64,95 @@ export default function RootLayout({ }: Readonly<{ children: React.ReactNode; }>) { + const structuredData = { + "@context": "https://schema.org", + "@type": "Event", + "name": "Incia & Arvin's Wedding Ceremony", + "description": "Join us in celebrating the love story of Incia & Arvin - from childhood friends at American International School of Dhaka to forever partners.", + "startDate": "2025-12-16T18:00:00+06:00", + "endDate": "2025-12-16T23:00:00+06:00", + "eventStatus": "https://schema.org/EventScheduled", + "eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode", + "location": { + "@type": "Place", + "name": "Wedding Venue Dhaka", + "address": { + "@type": "PostalAddress", + "addressLocality": "Dhaka", + "addressCountry": "Bangladesh", + "addressRegion": "Dhaka Division" + }, + "geo": { + "@type": "GeoCoordinates", + "latitude": "23.8103", + "longitude": "90.4125" + } + }, + "organizer": [ + { + "@type": "Person", + "name": "Incia", + "givenName": "Incia" + }, + { + "@type": "Person", + "name": "Arvin", + "givenName": "Arvin" + } + ], + "performer": { + "@type": "Person", + "name": "Incia & Arvin" + }, + "offers": { + "@type": "Offer", + "availability": "https://schema.org/InviteOnly", + "price": "0", + "priceCurrency": "USD" + }, + "image": [ + "https://arvinwedsincia.com/images/og-wedding-image.jpg" + ], + "url": "https://arvinwedsincia.com", + "subEvent": [ + { + "@type": "Event", + "name": "After-party in Phu Quoc, Vietnam", + "location": { + "@type": "Place", + "name": "Phu Quoc, Vietnam", + "address": { + "@type": "PostalAddress", + "addressLocality": "Phu Quoc", + "addressCountry": "Vietnam" + } + } + } + ] + }; + return ( + + {/* Enhanced structured data for wedding event */} +