From 93d5d9064f071e7b499c1ddb199f00669860dca0 Mon Sep 17 00:00:00 2001 From: xHomu Date: Thu, 28 Nov 2024 10:59:45 -0800 Subject: [PATCH] fix acessibility --- app/root.tsx | 2 +- app/routes/_editor+/blocks+/link/_link.tsx | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/app/root.tsx b/app/root.tsx index 273a9426..ca746f0b 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -195,7 +195,7 @@ function App() { const [searchToggle, setSearchToggle] = useState(false); return ( - + {!isBot && } diff --git a/app/routes/_editor+/blocks+/link/_link.tsx b/app/routes/_editor+/blocks+/link/_link.tsx index 7d5ccac2..76cc862e 100644 --- a/app/routes/_editor+/blocks+/link/_link.tsx +++ b/app/routes/_editor+/blocks+/link/_link.tsx @@ -557,7 +557,11 @@ export function LinkBlockElement({ element, children }: Props) { !element.removeCircleBorder ? 60 : undefined } url={element.icon.url} - alt={element?.name} + alt={ + children + ? undefined + : element?.name ?? undefined + } /> ) : ( ) : ( @@ -646,7 +650,9 @@ export function LinkBlockElement({ element, children }: Props) { : undefined } url={element.icon.url} - alt={children ? "" : element?.name} + alt={ + children ? undefined : element?.name ?? undefined + } /> ) : ( {element?.name} )} {!element.hideLinkText ? null : ( @@ -696,7 +704,7 @@ export function LinkBlockElement({ element, children }: Props) { element.iconWidth ? element.iconWidth * 2 : undefined } url={element.icon.url} - alt={children ? "" : element?.name} + alt={children ? undefined : element?.name ?? undefined} /> ) : ( {element?.name} )} {!element.hideLinkText ? undefined : (