From 3f1ca3797bfab59adebb7bd300096e2eab30d42d Mon Sep 17 00:00:00 2001 From: Xylight Date: Fri, 6 Sep 2024 18:01:33 -0700 Subject: [PATCH] a11y: add titles to image actions --- src/lib/components/ui/ExpandableImage.svelte | 5 +++++ src/lib/i18n/en.json | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/lib/components/ui/ExpandableImage.svelte b/src/lib/components/ui/ExpandableImage.svelte index 6252d6b9..248cbdc2 100644 --- a/src/lib/components/ui/ExpandableImage.svelte +++ b/src/lib/components/ui/ExpandableImage.svelte @@ -22,6 +22,7 @@ import { backOut, elasticOut, expoOut } from 'svelte/easing' import { fade, fly, scale } from 'svelte/transition' import { focusTrap } from 'svelte-focus-trap' + import { t } from '$lib/translations' /** * The full-resolution image URL @@ -71,6 +72,7 @@ color="tertiary" size="square-lg" rounding="pill" + title={$t('routes.profile.media.download')} > @@ -82,6 +84,7 @@ color="tertiary" size="square-lg" rounding="pill" + title={$t('post.actions.more.share')} > @@ -92,6 +95,7 @@ color="tertiary" size="square-lg" rounding="pill" + title={zoomed ? $t('post.image.zoomOut') : $t('post.image.zoomIn')} > diff --git a/src/lib/i18n/en.json b/src/lib/i18n/en.json index 32e2ed37..64641f3b 100644 --- a/src/lib/i18n/en.json +++ b/src/lib/i18n/en.json @@ -490,6 +490,11 @@ "removed": "Removed", "deleted": "Deleted", "saved": "Saved" + }, + "image": { + "zoomIn": "Zoom in", + "zoomOut": "Zoom out", + "close": "Close" } }, "comment": {