web/DonateAltItem: add proper aria label

This commit is contained in:
wukko 2024-09-08 20:47:33 +06:00
parent fb1b5ffee2
commit cda99a96e8
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2
2 changed files with 8 additions and 1 deletions

View file

@ -29,5 +29,8 @@
"share.title": "share cobalt with a friend", "share.title": "share cobalt with a friend",
"alternative.title": "alternative ways to donate" "alternative.title": "alternative ways to donate",
"alt.copy": "{{ value }}. crypto wallet address. press to copy.",
"alt.open": "{{ value }}. donation link, press to open."
} }

View file

@ -1,4 +1,5 @@
<script lang="ts"> <script lang="ts">
import { t } from "$lib/i18n/translations";
import { copyURL, openURL } from "$lib/download"; import { copyURL, openURL } from "$lib/download";
import CopyIcon from "$components/misc/CopyIcon.svelte"; import CopyIcon from "$components/misc/CopyIcon.svelte";
@ -20,6 +21,9 @@
<div class="wallet-holder"> <div class="wallet-holder">
<button <button
class="wallet" class="wallet"
aria-label={$t(`donate.alt.${type}`, {
value: name,
})}
on:click={() => { on:click={() => {
if (type === "copy") { if (type === "copy") {
copied = true; copied = true;