1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-27 05:11:11 +02:00

feat(web): add skip link to sidebar (#12330)

Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
Ben
2024-09-05 09:24:24 -04:00
committed by GitHub
parent ce2349d496
commit c5848112bb
6 changed files with 20 additions and 10 deletions

View File

@ -1,10 +1,12 @@
<script lang="ts">
import { t } from 'svelte-i18n';
import Button from './button.svelte';
/**
* Target for the skip link to move focus to.
*/
export let target: string = 'main';
export let text: string = $t('skip_to_content');
let isFocused = false;
@ -22,6 +24,6 @@
on:focus={() => (isFocused = true)}
on:blur={() => (isFocused = false)}
>
<slot />
{text}
</Button>
</div>