Skip to content

Commit

Permalink
Use a button rather than a label for optics upload
Browse files Browse the repository at this point in the history
Generally a label is good for accommodating people with JS disabled, but in this case we need JS either way, and this improves accessibility by making the button selectable/tabable
  • Loading branch information
oeb25 committed Mar 2, 2024
1 parent c521459 commit 7acff28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/routes/settings/sites/OpticsUpload.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { getButtonStyle } from '$lib/themes';
import { Ranking } from '$lib/rankings';
import { hostRankingsStore } from '$lib/stores';
import Button from '$lib/components/Button.svelte';
let input: HTMLInputElement;
Expand Down Expand Up @@ -57,4 +57,4 @@
on:change={importOpticFile}
hidden
/>
<label for="optic-import" class={getButtonStyle()}> Import from optic </label>
<Button on:click={() => input.click()}>Import from optic</Button>

0 comments on commit 7acff28

Please sign in to comment.