Skip to content

Commit

Permalink
fix acessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
xHomu committed Nov 28, 2024
1 parent 36a9f82 commit 93d5d90
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ function App() {
const [searchToggle, setSearchToggle] = useState(false);

return (
<html className={`font-body scroll-smooth ${theme ?? ""}`}>
<html lang="en" className={`font-body scroll-smooth ${theme ?? ""}`}>
<head>
{!isBot && <ClientHintCheck />}
<meta charSet="utf-8" />
Expand Down
20 changes: 14 additions & 6 deletions app/routes/_editor+/blocks+/link/_link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
/>
) : (
<Icon
Expand Down Expand Up @@ -605,7 +609,7 @@ export function LinkBlockElement({ element, children }: Props) {
width={!element.removeCircleBorder ? 60 : 120}
height={!element.removeCircleBorder ? 60 : undefined}
url={element.icon.url}
alt={element?.name}
alt={children ? undefined : element?.name ?? undefined}
/>
) : (
<Icon name="component" className="text-1" size={12} />
Expand Down Expand Up @@ -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
}
/>
) : (
<Image
Expand All @@ -661,7 +667,9 @@ export function LinkBlockElement({ element, children }: Props) {
width: element.iconWidth,
}}
url={element.icon.url}
alt={element?.name}
alt={
children ? undefined : element?.name ?? undefined
}
/>
)}
{!element.hideLinkText ? null : (
Expand Down Expand Up @@ -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}
/>
) : (
<Image
Expand All @@ -709,7 +717,7 @@ export function LinkBlockElement({ element, children }: Props) {
width: element.iconWidth,
}}
url={element.icon.url}
alt={element?.name}
alt={children ? undefined : element?.name ?? undefined}
/>
)}
{!element.hideLinkText ? undefined : (
Expand Down

0 comments on commit 93d5d90

Please sign in to comment.