fix(web): correctly use button and link elements (#7907)

This commit is contained in:
Michel Heusschen 2024-03-12 20:30:19 +01:00 committed by GitHub
parent 67b209808f
commit b07ed3f615
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 64 additions and 81 deletions

View file

@ -1,5 +1,4 @@
<script lang="ts">
import { goto } from '$app/navigation';
import Icon from '$lib/components/elements/icon.svelte';
import { AppRoute } from '$lib/constants';
import { getAssetThumbnailUrl } from '$lib/utils';
@ -122,15 +121,9 @@
{/if}
{#if !link.expiresAt || !isExpired(link.expiresAt)}
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="hover:cursor-pointer"
title="Go to share page"
on:click={() => goto(`${AppRoute.SHARE}/${link.key}`)}
on:keydown={() => goto(`${AppRoute.SHARE}/${link.key}`)}
>
<a href="{AppRoute.SHARE}/{link.key}" title="Go to share page">
<Icon path={mdiOpenInNew} />
</div>
</a>
{/if}
</div>