Skip to content

Commit

Permalink
Drop redundant title tooltip for sensitive content
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvkb committed Aug 30, 2024
1 parent 36cb204 commit 4d4c81e
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions frontend/src/components/VImageCell/VImageCell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,15 @@ const getImgDimension = (event: Event) => {
imgWidth.value = element.naturalWidth
}
const contextSensitiveTitle = computed(() => {
return shouldBlur.value
? t("sensitiveContent.title.image")
: t("browsePage.aria.imageTitle", {
title: props.image.title,
})
const imageTitle = t("browsePage.aria.imageTitle", {
title: props.image.title,
})
const contextSensitiveLabel = computed(() =>
shouldBlur.value ? t("sensitiveContent.singleResult.title") : imageTitle
)
const contextSensitiveTitle = computed(() =>
shouldBlur.value ? undefined : imageTitle
)
const { $sendCustomEvent } = useNuxtApp()
const searchStore = useSearchStore()
Expand Down Expand Up @@ -145,7 +147,7 @@ const { isHidden: shouldBlur } = useSensitiveMedia(props.image)
:title="contextSensitiveTitle"
:href="imageLink"
class="group relative block w-full overflow-hidden rounded-sm text-gray-2 hover:no-underline focus-visible:outline-3 focus-visible:outline-offset-4"
:aria-label="contextSensitiveTitle"
:aria-label="contextSensitiveLabel"
@mousedown="sendSelectSearchResultEvent"
>
<figure
Expand Down

0 comments on commit 4d4c81e

Please sign in to comment.