From 17dcd96efc5ea8a81a80841c4af296b9ac430928 Mon Sep 17 00:00:00 2001 From: spatiumstas <79056064+spatiumstas@users.noreply.github.com> Date: Tue, 13 Oct 2026 14:52:23 +0300 Subject: [PATCH] fix(site): improve accessibility and preserve login translation (#2604) --- internal/site/src/components/login/login.tsx | 6 ++-- internal/site/src/components/logo.tsx | 2 +- internal/site/src/components/router.tsx | 4 +-- internal/site/src/components/ui/icons.tsx | 38 ++++++++++---------- internal/site/src/components/ui/otp.tsx | 2 +- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/internal/site/src/components/login/login.tsx b/internal/site/src/components/login/login.tsx index a463e408f..5a648011e 100644 --- a/internal/site/src/components/login/login.tsx +++ b/internal/site/src/components/login/login.tsx @@ -18,7 +18,7 @@ export default function () { const { resolvedTheme } = useTheme() useEffect(() => { - document.title = t`Login` + " / Beszel" + document.title = `${t`Login`} / Beszel` pb.send("/api/beszel/first-run", {}).then(({ firstRun }) => { setFirstRun(firstRun) @@ -54,15 +54,15 @@ export default function () {

+ {/* Logo's aria-label provides the heading text */} - Beszel

{subtitle}

diff --git a/internal/site/src/components/logo.tsx b/internal/site/src/components/logo.tsx index 9feef5bc3..0b094057d 100644 --- a/internal/site/src/components/logo.tsx +++ b/internal/site/src/components/logo.tsx @@ -7,7 +7,7 @@ export function Logo({ className }: { className?: string }) { return ( // Righteous font from Google Fonts - + diff --git a/internal/site/src/components/router.tsx b/internal/site/src/components/router.tsx index 93808c049..9b118334e 100644 --- a/internal/site/src/components/router.tsx +++ b/internal/site/src/components/router.tsx @@ -39,13 +39,13 @@ export const navigate = (urlString: string) => { $router.open(urlString) } -export function Link(props: React.AnchorHTMLAttributes) { +export function Link({ href, ...props }: React.AnchorHTMLAttributes & { href: string }) { return ( { e.preventDefault() - const href = props.href || "" if (e.ctrlKey || e.metaKey) { window.open(href, "_blank") } else { diff --git a/internal/site/src/components/ui/icons.tsx b/internal/site/src/components/ui/icons.tsx index f92259bdf..c34d35856 100644 --- a/internal/site/src/components/ui/icons.tsx +++ b/internal/site/src/components/ui/icons.tsx @@ -3,7 +3,7 @@ import type { SVGProps } from "react" // linux-logo-bold from https://github.com/phosphor-icons/core (MIT license) export function TuxIcon(props: SVGProps) { return ( - +
+ )