Skip to content

best way to save what you love

web/ProcessingQueueItem: make buttons accessible for screen readers

wukkod337de1f6352
diff --git a/web/i18n/en/button.json b/web/i18n/en/button.json
index 4c29c342..643f4b8e 100644
--- a/web/i18n/en/button.json
+++ b/web/i18n/en/button.json
@@ -22,5 +22,8 @@
"hide_input": "hide input",
"restore_input": "restore input",
"clear_input": "clear input",
- "clear_cache": "clear cache"
+ "clear_cache": "clear cache",
+ "remove": "remove",
+ "retry": "retry",
+ "delete": "delete"
}
diff --git a/web/src/components/queue/ProcessingQueueItem.svelte b/web/src/components/queue/ProcessingQueueItem.svelte
index baa148bc..2675205e 100644
--- a/web/src/components/queue/ProcessingQueueItem.svelte
+++ b/web/src/components/queue/ProcessingQueueItem.svelte
@@ -162,6 +162,7 @@
{#if info.state === "done" && info.resultFile}
<button
class="button action-button"
+ aria-label={$t("button.download")}
on:click={() => download(info.resultFile)}
>
<IconDownload />
@@ -172,6 +173,7 @@
{#if info.state === "error" && info?.canRetry}
<button
class="button action-button"
+ aria-label={$t("button.retry")}
on:click={() => retry(info)}
>
<IconReload />
@@ -179,6 +181,7 @@
{/if}
<button
class="button action-button"
+ aria-label={$t(`button.${info.state === "done" ? "delete" : "remove"}`)}
on:click={() => removeItem(id)}
>
<IconX />