feat(a11y): add skip to content link
- Add `SkipLink` component to `src/components/ui` - Integrate `SkipLink` in `src/App.tsx` - Add `id="main-content"` and proper focus management to page containers - Add translations for the skip link text - Add unit test for `SkipLink` Co-authored-by: ragusa-it <196988693+ragusa-it@users.noreply.github.com>
This commit is contained in:
12
src/components/ui/SkipLink.tsx
Normal file
12
src/components/ui/SkipLink.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { useTranslation } from '../../i18n';
|
||||
import styles from './SkipLink.module.css';
|
||||
|
||||
export function SkipLink() {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<a href="#main-content" className={styles.skipLink}>
|
||||
{t.nav.skipToContent}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user