From e123cdbf5dca8e77df8c9d18a511b7a6335197b7 Mon Sep 17 00:00:00 2001 From: Olga Bulat Date: Mon, 13 May 2024 18:19:28 +0300 Subject: [PATCH] Fix the aria label for search result grid (#4301) * Fix the aria label for search result grid Signed-off-by: Olga Bulat * Add comment Signed-off-by: Olga Bulat --------- Signed-off-by: Olga Bulat --- .../components/VSearchResultsGrid/VSearchResults.vue | 2 +- frontend/src/locales/scripts/en.json5 | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/VSearchResultsGrid/VSearchResults.vue b/frontend/src/components/VSearchResultsGrid/VSearchResults.vue index 71c564b8893..aca33392a29 100644 --- a/frontend/src/components/VSearchResultsGrid/VSearchResults.vue +++ b/frontend/src/components/VSearchResultsGrid/VSearchResults.vue @@ -102,7 +102,7 @@ export default defineComponent({ const collectionLabel = computed(() => { return i18n - .t(`browsePage.aria.results.${props.results.type}`, { + .t(`browsePage.aria.resultsLabel.${props.results.type}`, { query: props.searchTerm, }) .toString() diff --git a/frontend/src/locales/scripts/en.json5 b/frontend/src/locales/scripts/en.json5 index 453f30fc069..7722656bb80 100644 --- a/frontend/src/locales/scripts/en.json5 +++ b/frontend/src/locales/scripts/en.json5 @@ -685,6 +685,16 @@ creator: "search by creator", imageTitle: "Image: {title}", audioTitle: "Audio track: {title}", + /** + * These strings are used as aria-label of the list of the search results. + * The number of results is given in `results.mediaType`, so is not + * needed here. + */ + resultsLabel: { + all: "All results for {query}", + image: "Image results for {query}", + audio: "Audio tracks for {query}", + }, results: { /** * "imageResults" and "audioResults" are interpolated from the strings under