From 9555e7aecff4a3d1dc5aa1ab182fdb094629c5e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Bl=C3=A4ttermann?= Date: Tue, 24 Jan 2023 14:01:00 +0100 Subject: [PATCH 1/2] Remove unnessary links (#12159) 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 && (
From 0a706969230f93e5819855aa2c4e1cae84c42aa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Bl=C3=A4ttermann?= Date: Tue, 24 Jan 2023 14:35:31 +0100 Subject: [PATCH 2/2] Fix wrong HTML element attribute (#12151) Originally introduced in 62b9c9c6d711584cea91244bc765e56e74337fdd Original error: Warning: Invalid DOM property `class`. Did you mean `className`? React doesn't have `class`, it uses `className`. --- website/src/components/embed.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/components/embed.js b/website/src/components/embed.js index e275077b0..2b210b5d6 100644 --- a/website/src/components/embed.js +++ b/website/src/components/embed.js @@ -110,7 +110,7 @@ const Image = ({ src, alt, title, href, ...props }) => { const ImageFill = ({ image, ...props }) => { return (