Skip to content

Commit 9bddce6

Browse files
committed
Use image alt as aria-label on the link instead
1 parent 597430e commit 9bddce6

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/components/ContentRenderer/components/NoConsentFallback.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ export function NoConsentFallback({ id, entity, oembed }: Props) {
2020

2121
if (oembed.screenshot_url) {
2222
return (
23-
<NextLink id={id} className={styles.imageFallback} href={oembed.url} target="__blank">
24-
<img
25-
className={styles.image}
26-
src={oembed.screenshot_url}
27-
alt={oembed.title || oembed.description || ''}
28-
/>
23+
<NextLink
24+
aria-label={oembed.title || oembed.description || ''}
25+
id={id}
26+
className={styles.imageFallback}
27+
href={oembed.url}
28+
target="__blank"
29+
>
30+
<img alt="" className={styles.image} src={oembed.screenshot_url} />
2931
</NextLink>
3032
);
3133
}

0 commit comments

Comments
 (0)