From 9ebf2afa7af4f17696dac645ebbe31e2068e0a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Bl=C3=A4ttermann?= Date: Tue, 24 Jan 2023 09:53:02 +0100 Subject: [PATCH] Remove unnessary links There is no need to link to the image we are already viewing and this is also considered an accessibility issue. --- website/src/components/embed.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/website/src/components/embed.js b/website/src/components/embed.js index 53f4e9184..e275077b0 100644 --- a/website/src/components/embed.js +++ b/website/src/components/embed.js @@ -88,10 +88,16 @@ const Image = ({ src, alt, title, href, ...props }) => { const markdownComponents = { code: InlineCode, p: Fragment, a: Link } return (
- - {/* eslint-disable-next-line @next/next/no-img-element */} + {href ? ( + + {/* eslint-disable-next-line @next/next/no-img-element */} + {alt} + + ) : ( + /* eslint-disable-next-line @next/next/no-img-element */ {alt} - + )} + {title && (