From 0808fcc2d5478b8afd80884295724ee4b7a0c5a2 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 31 Jan 2026 02:05:30 +0000 Subject: [PATCH] feat(a11y): add accessible Skip to Content link - Added `SkipLink` component that is visible on focus. - Updated `App.tsx` to include `SkipLink` and wrap content in `
`. - Added translation keys for skip link in English and German. - Added unit tests for `SkipLink`. This improves accessibility for keyboard and screen reader users by allowing them to bypass the navigation menu. Co-authored-by: ragusa-it <196988693+ragusa-it@users.noreply.github.com> --- src/App.tsx | 21 +++++++----- src/components/ui/SkipLink.module.css | 20 +++++++++++ src/components/ui/SkipLink.tsx | 12 +++++++ src/components/ui/__tests__/SkipLink.test.tsx | 33 +++++++++++++++++++ src/components/ui/index.ts | 1 + src/i18n/de.ts | 1 + src/i18n/en.ts | 1 + 7 files changed, 80 insertions(+), 9 deletions(-) create mode 100644 src/components/ui/SkipLink.module.css create mode 100644 src/components/ui/SkipLink.tsx create mode 100644 src/components/ui/__tests__/SkipLink.test.tsx diff --git a/src/App.tsx b/src/App.tsx index 5c4e796..f57501b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -3,7 +3,7 @@ import { BrowserRouter, Routes, Route } from 'react-router-dom'; import { LanguageProvider } from './i18n'; import { Navbar, Footer, FancyCursor, ScrollToTop } from './components/layout'; import { Home } from './pages/Home'; -import { PageLoader } from './components/ui'; +import { PageLoader, SkipLink } from './components/ui'; import './styles/global.css'; // Lazy load pages to reduce initial bundle size. @@ -15,17 +15,20 @@ export function App() { return ( + - {/* Suspense handles the loading state for lazy-loaded routes */} - }> - - } /> - } /> - } /> - - +
+ {/* Suspense handles the loading state for lazy-loaded routes */} + }> + + } /> + } /> + } /> + + +