Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,87 @@ body {
* {
border-color: var(--border);
}

/* Enhanced Focus Indicators for WCAG 2.1 AA Compliance */
*:focus {
outline: none;
}

*:focus-visible {
outline: 2px solid var(--ring);
outline-offset: 2px;
border-radius: calc(var(--radius) - 2px);
}

/* High contrast focus for better visibility */
@media (prefers-contrast: high) {
*:focus-visible {
outline-width: 3px;
outline-offset: 3px;
}
}

/* Skip links enhanced visibility */
.sr-only:focus-visible,
.sr-only:focus {
position: absolute;
width: auto;
height: auto;
padding: 0.5rem 1rem;
margin: 0;
overflow: visible;
clip: auto;
white-space: nowrap;
background: var(--primary);
color: var(--primary-foreground);
border-radius: var(--radius);
box-shadow: var(--shadow-lg);
z-index: 1000;
}

/* Button focus states */
button:focus-visible,
[role="button"]:focus-visible {
outline: 2px solid var(--ring);
outline-offset: 2px;
}

/* Link focus states */
a:focus-visible {
outline: 2px solid var(--ring);
outline-offset: 2px;
text-decoration: underline;
text-decoration-thickness: 2px;
text-underline-offset: 3px;
}

/* Form element focus states */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
outline: 2px solid var(--ring);
outline-offset: 2px;
border-color: var(--ring);
}

/* Ensure interactive elements have minimum touch target size */
button,
[role="button"],
input[type="button"],
input[type="submit"],
input[type="reset"] {
min-height: 44px;
min-width: 44px;
}

/* Improved link styling for better accessibility */
a {
color: var(--primary);
text-decoration-skip-ink: auto;
}

a:hover {
text-decoration: underline;
text-decoration-thickness: 2px;
text-underline-offset: 3px;
}
4 changes: 3 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import "./globals.css";
import { Header } from "@/components/layout/header";
import { Footer } from "@/components/layout/footer";
import { SkipLinks } from "@/components/ui/skip-links";
import { KeyboardNavigation } from "@/components/ui/keyboard-navigation";
import { ThemeProvider } from "@/lib/theme-context";

const geistSans = Geist({
Expand Down Expand Up @@ -57,10 +58,11 @@ export default function RootLayout({
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
<ThemeProvider>
<KeyboardNavigation />
<SkipLinks />
<div className="flex min-h-screen flex-col">
<Header />
<main id="main-content" className="flex-1">{children}</main>
<main id="main-content" className="flex-1" tabIndex={-1}>{children}</main>
<Footer />
</div>
</ThemeProvider>
Expand Down
38 changes: 24 additions & 14 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,34 +33,44 @@ export default function Home() {
{/* CTA Buttons */}
<Stack direction="row" gap={4} className="flex-col sm:flex-row max-w-md w-full">
<Button size="lg" className="w-full sm:w-auto" asChild>
<a href="https://github.com/CodeStorm-Hub" target="_blank" rel="noopener noreferrer">
<GitHubLogoIcon className="mr-2 h-4 w-4" />
<a
href="https://github.com/CodeStorm-Hub"
target="_blank"
rel="noopener noreferrer"
aria-label="View CodeStorm Hub projects on GitHub (opens in new tab)"
>
<GitHubLogoIcon className="mr-2 h-4 w-4" aria-hidden="true" />
View Projects
<ArrowRightIcon className="ml-2 h-4 w-4" />
<ArrowRightIcon className="ml-2 h-4 w-4" aria-hidden="true" />
</a>
</Button>
<Button variant="outline" size="lg" className="w-full sm:w-auto">
<Button
variant="outline"
size="lg"
className="w-full sm:w-auto"
aria-label="Join the CodeStorm Hub community"
>
Join Community
</Button>
</Stack>

{/* Features Grid */}
<div className="mt-20 w-full max-w-5xl">
<Grid cols={3} gap={8} className="items-start">
<Stack align="center" gap={4} className="text-center">
<div className="w-14 h-14 bg-primary/10 rounded-xl flex items-center justify-center shadow-sm">
<GitHubLogoIcon className="h-7 w-7 text-primary" />
<div className="text-center">
<div className="w-14 h-14 bg-primary/10 rounded-xl flex items-center justify-center shadow-sm mx-auto mb-4" role="img" aria-label="Open source icon">
<GitHubLogoIcon className="h-7 w-7 text-primary" aria-hidden="true" />
</div>
<div className="space-y-2">
<Typography variant="h5" className="font-semibold">Open Source</Typography>
<Typography variant="muted" className="text-sm leading-relaxed max-w-sm">
Building transparent, accessible solutions for the community
</Typography>
</div>
</Stack>
</div>

<Stack align="center" gap={4} className="text-center">
<div className="w-14 h-14 bg-primary/10 rounded-xl flex items-center justify-center shadow-sm">
<div className="text-center">
<div className="w-14 h-14 bg-primary/10 rounded-xl flex items-center justify-center shadow-sm mx-auto mb-4" role="img" aria-label="Community icon">
<svg className="h-7 w-7 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" />
</svg>
Expand All @@ -71,10 +81,10 @@ export default function Home() {
Connecting passionate developers and researchers worldwide
</Typography>
</div>
</Stack>
</div>

<Stack align="center" gap={4} className="text-center">
<div className="w-14 h-14 bg-primary/10 rounded-xl flex items-center justify-center shadow-sm">
<div className="text-center">
<div className="w-14 h-14 bg-primary/10 rounded-xl flex items-center justify-center shadow-sm mx-auto mb-4" role="img" aria-label="Innovation icon">
<svg className="h-7 w-7 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M13 10V3L4 14h7v7l9-11h-7z" />
</svg>
Expand All @@ -85,7 +95,7 @@ export default function Home() {
Pushing boundaries with cutting-edge research and development
</Typography>
</div>
</Stack>
</div>
</Grid>
</div>
</Stack>
Expand Down
Loading