From 490bdb729e390e0b6dc6d2ecf7f306be17c09e25 Mon Sep 17 00:00:00 2001 From: wukko <me@wukko.me> Date: Sun, 22 Sep 2024 16:22:18 +0600 Subject: [PATCH] web/Omnibox: add aria label for loading captcha state --- web/i18n/en/a11y/save.json | 1 + web/src/components/save/Omnibox.svelte | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/web/i18n/en/a11y/save.json b/web/i18n/en/a11y/save.json index 3a92de64..2dc85154 100644 --- a/web/i18n/en/a11y/save.json +++ b/web/i18n/en/a11y/save.json @@ -1,5 +1,6 @@ { "link_area": "link input area", + "link_area.turnstile": "link input area. checking if you're not a robot.", "clear_input": "clear input", "download": "download", "download.think": "processing the link...", diff --git a/web/src/components/save/Omnibox.svelte b/web/src/components/save/Omnibox.svelte index dfbd560e..a900def7 100644 --- a/web/src/components/save/Omnibox.svelte +++ b/web/src/components/save/Omnibox.svelte @@ -140,7 +140,10 @@ class:focused={isFocused} class:downloadable={validLink($link)} > - <div id="input-link-icon" class:loading={isLoading || isBotCheckOngoing}> + <div + id="input-link-icon" + class:loading={isLoading || isBotCheckOngoing} + > {#if isLoading || isBotCheckOngoing} <IconLoader2 /> {:else} @@ -160,7 +163,9 @@ autocapitalize="off" maxlength="512" placeholder={$t("save.input.placeholder")} - aria-label={$t("a11y.save.link_area")} + aria-label={isBotCheckOngoing + ? $t("a11y.save.link_area.turnstile") + : $t("a11y.save.link_area")} data-form-type="other" disabled={isDisabled} />