diff --git a/src/app/AppRouter.tsx b/src/app/AppRouter.tsx index df4d012..ac559b5 100644 --- a/src/app/AppRouter.tsx +++ b/src/app/AppRouter.tsx @@ -29,6 +29,7 @@ function LanguageSyncer() { function AppShell() { const location = useLocation(); + const { texts } = useLanguage(); useEffect(() => { const hash = location.hash.substring(1); @@ -44,7 +45,9 @@ function AppShell() { return (
- Skip to main content + + {texts.accessibility.skipLinks.skipToHero} +
diff --git a/src/app/__tests__/a11y.smoke.test.tsx b/src/app/__tests__/a11y.smoke.test.tsx index c9a28d7..ebe6fed 100644 --- a/src/app/__tests__/a11y.smoke.test.tsx +++ b/src/app/__tests__/a11y.smoke.test.tsx @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest'; -import { render } from '@testing-library/react'; +import { render, screen } from '@testing-library/react'; import { axe } from 'vitest-axe'; import { MemoryRouter } from 'react-router-dom'; import type { ReactNode } from 'react'; @@ -8,6 +8,7 @@ import { ThemeProvider } from '../../contexts/ThemeContext'; import LandingPage from '../../pages/LandingPage'; import HomePage from '../../pages/HomePage'; import AuditPage from '../../pages/AuditPage'; +import Footer from '../../components/layout/Footer'; function renderPage(children: ReactNode) { return render( @@ -34,4 +35,11 @@ describe('accessibility smoke test', () => { const { container } = renderPage(); expect(await axe(container)).toHaveNoViolations(); }); + + it('Footer keeps the active language for the portfolio link', () => { + renderPage(