Skip to content

Commit 612cae4

Browse files
ajitpratap0Ajit Pratap Singhclaude
authored
fix(website): homepage visibility, color contrast, keyboard a11y, mobile overflow (#414)
- #396: Confirmed all home sections use FadeIn with animate (not whileInView); no scroll-triggered opacity:0 issues exist in current code. - #399: Upgrade text-zinc-400/text-zinc-500 → text-zinc-300 on readable content (Footer links/description/copyright, StatsBar labels, FeatureGrid descriptions, VscodeSection description, McpSection subtitle, docs breadcrumb nav) to meet WCAG AA 4.5:1 contrast ratio. Decorative elements and hover states unchanged. - #400: Add tabIndex={0}, role="region", aria-label, and focus:ring styles to both scrollable <pre> blocks in Hero.tsx (SQL input and AST output panels). mdx-components.tsx pre already had tabIndex={0} — no change needed there. - #401: Fix StatsBar min-w-[140px] causing overflow on 320px viewports by replacing with w-full and removing justify-items-center. Add overflow-x-hidden to <body> in layout.tsx (globals.css already sets it on html/body via CSS but Tailwind class ensures it applies before CSS loads). Closes #396, #399, #400, #401 Co-authored-by: Ajit Pratap Singh <ajitpratapsingh@Ajits-Mac-mini-2655.local> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent bb7d2ad commit 612cae4

8 files changed

Lines changed: 24 additions & 14 deletions

File tree

website/src/app/docs/[...slug]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export default async function DocPage({ params }: PageProps) {
105105
{/* Main content */}
106106
<main className="min-w-0 flex-1 px-6 py-10 lg:px-12">
107107
{/* Breadcrumbs */}
108-
<nav aria-label="Breadcrumb" className="mb-6 text-sm text-zinc-500">
108+
<nav aria-label="Breadcrumb" className="mb-6 text-sm text-zinc-300">
109109
<ol className="flex items-center gap-2">
110110
<li>
111111
<Link href="/docs" className="hover:text-white transition-colors">

website/src/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default function RootLayout({
5151
}>) {
5252
return (
5353
<html lang="en" className={`${instrumentSans.variable} ${jetbrainsMono.variable}`}>
54-
<body className="font-sans">
54+
<body className="font-sans overflow-x-hidden">
5555
<a
5656
href="#main-content"
5757
className="sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4 focus:z-50 focus:rounded-md focus:bg-white focus:px-4 focus:py-2 focus:text-sm focus:font-medium focus:text-black focus:shadow-lg focus:outline-none"

website/src/components/home/FeatureGrid.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export function FeatureGrid() {
6363
{icons[feature.icon]}
6464
</div>
6565
<h3 className="text-lg font-semibold text-white mb-1">{feature.title}</h3>
66-
<p className="text-sm text-zinc-400">{feature.description}</p>
66+
<p className="text-sm text-zinc-300">{feature.description}</p>
6767
</GlassCard>
6868
</FadeIn>
6969
))}

website/src/components/home/Hero.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,12 @@ export function Hero() {
131131
<span className="text-xs text-zinc-500 font-mono ml-2">query.sql</span>
132132
</div>
133133
<div className="relative">
134-
<pre className="p-4 text-[13px] leading-relaxed font-mono text-zinc-300 overflow-x-auto max-h-[320px]">
134+
<pre
135+
tabIndex={0}
136+
role="region"
137+
aria-label="SQL query input"
138+
className="p-4 text-[13px] leading-relaxed font-mono text-zinc-300 overflow-x-auto max-h-[320px] focus:outline-none focus:ring-2 focus:ring-accent-indigo/50"
139+
>
135140
<code>{SAMPLE_SQL}</code>
136141
</pre>
137142
<div className="absolute right-0 top-0 bottom-0 w-8 bg-gradient-to-l from-zinc-950/60 to-transparent pointer-events-none md:hidden" aria-hidden="true" />
@@ -144,7 +149,12 @@ export function Hero() {
144149
<span className="text-xs text-zinc-500 font-mono">AST Output</span>
145150
<span className="ml-auto text-[10px] text-emerald-400/70 font-mono">parsed in &lt;1ms</span>
146151
</div>
147-
<pre className="p-4 text-[13px] leading-relaxed font-mono text-zinc-400 overflow-x-auto max-h-[320px]">
152+
<pre
153+
tabIndex={0}
154+
role="region"
155+
aria-label="AST output"
156+
className="p-4 text-[13px] leading-relaxed font-mono text-zinc-400 overflow-x-auto max-h-[320px] focus:outline-none focus:ring-2 focus:ring-accent-indigo/50"
157+
>
148158
<code>{SAMPLE_AST}</code>
149159
</pre>
150160
</div>

website/src/components/home/McpSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function McpSection() {
2222
<h2 className="text-3xl font-bold text-white mb-4">
2323
AI-Ready SQL Tools
2424
</h2>
25-
<p className="text-zinc-400 mb-10 max-w-xl mx-auto">
25+
<p className="text-zinc-300 mb-10 max-w-xl mx-auto">
2626
Connect 7 SQL tools to Claude, Cursor, or any MCP client — no installation, no API key.
2727
</p>
2828
</FadeIn>

website/src/components/home/StatsBar.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ export function StatsBar() {
1515
return (
1616
<section className="py-20">
1717
<div className="max-w-6xl mx-auto px-4">
18-
<div className="grid grid-cols-2 sm:grid-cols-4 gap-4 md:gap-8 justify-items-center">
18+
<div className="grid grid-cols-2 sm:grid-cols-4 gap-4 md:gap-8">
1919
{stats.map((stat, i) => (
2020
<FadeIn key={stat.label} delay={i * 0.1}>
21-
<GlassCard className="p-6 text-center min-w-[140px]">
21+
<GlassCard className="p-6 text-center w-full">
2222
<div className="flex items-baseline justify-center gap-0.5">
2323
{stat.prefix && (
2424
<span className={`text-4xl font-bold ${stat.color}`}>{stat.prefix}</span>
2525
)}
2626
<AnimatedCounter value={stat.value} suffix={stat.suffix} color={stat.color} />
2727
</div>
28-
<p className="text-sm text-zinc-400 mt-1">{stat.label}</p>
28+
<p className="text-sm text-zinc-300 mt-1">{stat.label}</p>
2929
</GlassCard>
3030
</FadeIn>
3131
))}

website/src/components/home/VscodeSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function VscodeSection() {
1515
<h2 className="text-3xl font-bold text-white mb-4">
1616
IDE Integration
1717
</h2>
18-
<p className="text-zinc-400 mb-6 max-w-md">
18+
<p className="text-zinc-300 mb-6 max-w-md">
1919
Real-time SQL validation, formatting, and linting in VS Code. Catch errors as you type with full multi-dialect support.
2020
</p>
2121
<Button

website/src/components/layout/Footer.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export function Footer() {
4141
<Image src="/images/logo.webp" alt="" width={28} height={28} />
4242
<span className="text-lg font-semibold text-white">GoSQLX</span>
4343
</Link>
44-
<p className="mt-3 text-sm text-zinc-400 max-w-xs">
44+
<p className="mt-3 text-sm text-zinc-300 max-w-xs">
4545
Production-ready SQL parsing SDK for Go. Zero-copy, thread-safe, multi-dialect.
4646
</p>
4747
</div>
@@ -58,14 +58,14 @@ export function Footer() {
5858
href={link.href}
5959
target="_blank"
6060
rel="noopener noreferrer"
61-
className="text-sm text-zinc-400 hover:text-zinc-100 transition-colors duration-200"
61+
className="text-sm text-zinc-300 hover:text-zinc-100 transition-colors duration-200"
6262
>
6363
{link.label}
6464
</a>
6565
) : (
6666
<Link
6767
href={link.href}
68-
className="text-sm text-zinc-400 hover:text-zinc-100 transition-colors duration-200"
68+
className="text-sm text-zinc-300 hover:text-zinc-100 transition-colors duration-200"
6969
>
7070
{link.label}
7171
</Link>
@@ -78,7 +78,7 @@ export function Footer() {
7878
</div>
7979

8080
<div className="mt-12 pt-8 border-t border-white/[0.06] text-center">
81-
<p className="text-sm text-zinc-400">
81+
<p className="text-sm text-zinc-300">
8282
Built with love by the GoSQLX community &middot; &copy; {new Date().getFullYear()} GoSQLX
8383
</p>
8484
</div>

0 commit comments

Comments
 (0)