From 571f5afd5fd380ff3cb89dca6d4bf0e425d5f00a Mon Sep 17 00:00:00 2001 From: bokiko Date: Thu, 19 Mar 2026 12:12:57 +0000 Subject: [PATCH 1/2] feat(a11y): improve accessibility across all pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add skip-to-content link on community, download, and dashboard pages (home page already had it; now all pages are consistent) - Add aria-current="page" to active navigation links in Navbar, both desktop and mobile menus — screen readers now announce current page - Add aria-labelledby to major page sections (Features, How It Works, Supported Games on home; Preview Features on community) using matching id attributes on h2 elements - Add role="region" + aria-label to dashboard charts container - Add role="img" + aria-labelledby to individual chart wrappers (Recharts canvases are opaque to screen readers) - Add scope="col" to all dashboard table headers for correct cell-header associations in screen readers - Add aria-label="Recent ping test results" to the results table - Add aria-hidden="true" to purely decorative icons (Download, Construction, animated status dot) so screen readers skip them - Add aria-label and aria-disabled to download button for clear state announcement during loading - Add .sr-only utility class to globals.css (visually hidden but accessible to assistive tech) — used for the preview features section heading on the community page No new dependencies. No existing features removed. Build passes clean. --- web/src/app/community/page.tsx | 13 +++++++++---- web/src/app/dashboard/page.tsx | 30 +++++++++++++++++------------- web/src/app/download/page.tsx | 10 ++++++++-- web/src/app/globals.css | 13 +++++++++++++ web/src/app/page.tsx | 16 ++++++++-------- web/src/components/Navbar.tsx | 2 ++ 6 files changed, 57 insertions(+), 27 deletions(-) diff --git a/web/src/app/community/page.tsx b/web/src/app/community/page.tsx index 9899cd7..7a74157 100644 --- a/web/src/app/community/page.tsx +++ b/web/src/app/community/page.tsx @@ -7,13 +7,17 @@ import { Footer } from "@/components/Footer"; export default function CommunityPage() { return (
+ + Skip to main content + + -
+
{/* Coming Soon Banner */}
- +

Community Hub

@@ -25,7 +29,8 @@ export default function CommunityPage() {

{/* Preview Features */} -
+
+

Upcoming community features

@@ -55,7 +60,7 @@ export default function CommunityPage() { See the best ping results by region, ISP, and server location.

-
+
{/* CTA */}
diff --git a/web/src/app/dashboard/page.tsx b/web/src/app/dashboard/page.tsx index 137c80e..e05aac6 100644 --- a/web/src/app/dashboard/page.tsx +++ b/web/src/app/dashboard/page.tsx @@ -226,10 +226,14 @@ export default function DashboardPage() { return (
+ + Skip to main content + + {/* Main Content */} -
+

Dashboard

@@ -398,11 +402,11 @@ export default function DashboardPage() {
{/* Charts */} -
+
{/* Ping History Chart */}
-

Ping History

-
+

Ping History

+
@@ -429,8 +433,8 @@ export default function DashboardPage() { {/* Server Comparison Chart */}
-

Server Comparison

-
+

Server Comparison

+
@@ -459,15 +463,15 @@ export default function DashboardPage() {
- +
- - - - - - + + + + + + diff --git a/web/src/app/download/page.tsx b/web/src/app/download/page.tsx index c72f3d1..da5f335 100644 --- a/web/src/app/download/page.tsx +++ b/web/src/app/download/page.tsx @@ -65,10 +65,14 @@ export default function DownloadPage() { return (
+ + Skip to main content + + {/* Main Content */} -
+

Download PingDiff

@@ -111,8 +115,10 @@ export default function DownloadPage() { - +

diff --git a/web/src/app/globals.css b/web/src/app/globals.css index 6c87bdd..dea054e 100644 --- a/web/src/app/globals.css +++ b/web/src/app/globals.css @@ -95,6 +95,19 @@ body { top: 0; } +/* Screen-reader only utility — visually hidden but accessible to assistive tech */ +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; +} + /* Custom scrollbar */ ::-webkit-scrollbar { width: 8px; diff --git a/web/src/app/page.tsx b/web/src/app/page.tsx index 914ddff..8bfe4fd 100644 --- a/web/src/app/page.tsx +++ b/web/src/app/page.tsx @@ -65,7 +65,7 @@ export default function Home() { href="/download" className="inline-flex items-center justify-center gap-2 btn-primary px-8 py-4 rounded-xl font-semibold text-lg focus-ring" > - +
ServerPingJitterLossISPTimeServerPingJitterLossISPTime