From cda99a96e8676ee4f3caf32e719dc4bef9f9d35e Mon Sep 17 00:00:00 2001 From: wukko <me@wukko.me> Date: Sun, 8 Sep 2024 20:47:33 +0600 Subject: [PATCH] web/DonateAltItem: add proper aria label --- web/i18n/en/donate.json | 5 ++++- web/src/components/donate/DonateAltItem.svelte | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/web/i18n/en/donate.json b/web/i18n/en/donate.json index d0309518..33d47384 100644 --- a/web/i18n/en/donate.json +++ b/web/i18n/en/donate.json @@ -29,5 +29,8 @@ "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." } diff --git a/web/src/components/donate/DonateAltItem.svelte b/web/src/components/donate/DonateAltItem.svelte index 1c8b4dda..c82f987e 100644 --- a/web/src/components/donate/DonateAltItem.svelte +++ b/web/src/components/donate/DonateAltItem.svelte @@ -1,4 +1,5 @@ <script lang="ts"> + import { t } from "$lib/i18n/translations"; import { copyURL, openURL } from "$lib/download"; import CopyIcon from "$components/misc/CopyIcon.svelte"; @@ -20,6 +21,9 @@ <div class="wallet-holder"> <button class="wallet" + aria-label={$t(`donate.alt.${type}`, { + value: name, + })} on:click={() => { if (type === "copy") { copied = true;