Skip to content

Commit

Permalink
Fix the aria label for search result grid (#4301)
Browse files Browse the repository at this point in the history
* Fix the aria label for search result grid

Signed-off-by: Olga Bulat <obulat@gmail.com>

* Add comment

Signed-off-by: Olga Bulat <obulat@gmail.com>

---------

Signed-off-by: Olga Bulat <obulat@gmail.com>
  • Loading branch information
obulat authored May 13, 2024
1 parent 125c65e commit e123cdb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
10 changes: 10 additions & 0 deletions frontend/src/locales/scripts/en.json5
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e123cdb

Please sign in to comment.