feat(web): Field 标签自动关联控件 + 全局壳无障碍(skip link/设置可访问名/抽屉焦点归还)

This commit is contained in:
Yaojia Wang
2026-06-29 16:52:43 +02:00
parent dd80b6815d
commit a2849bf6b7
4 changed files with 52 additions and 6 deletions

View File

@@ -33,6 +33,12 @@ export function AppShell({
className="min-h-screen"
style={{ ["--chrome" as string]: projectId ? "7rem" : "4rem" }}
>
<a
href="#main"
className="sr-only focus:not-sr-only focus:absolute focus:left-4 focus:top-4 focus:z-50 focus:rounded focus:border focus:border-line focus:bg-panel focus:px-3 focus:py-2 focus:text-sm focus:text-ink focus:shadow-paper"
>
</a>
<header className="flex h-16 items-center gap-4 border-b border-line bg-panel px-4 sm:px-6">
<NavDrawer projectId={projectId} activeNav={activeNav} />
<Link
@@ -52,10 +58,15 @@ export function AppShell({
{subtitle}
</span>
) : null}
<nav className="ml-auto flex shrink-0 items-center gap-2 text-sm">
<nav
aria-label="快捷操作"
className="ml-auto flex shrink-0 items-center gap-2 text-sm"
>
<ThemeToggle />
<Link
href="/settings/providers"
aria-label="设置"
title="设置"
className={buttonClass({
variant: "ghost",
size: "sm",
@@ -72,7 +83,11 @@ export function AppShell({
) : null}
<div className="flex">
<LeftNav projectId={projectId} activeNav={activeNav} />
<main className="min-h-[calc(100vh-var(--chrome,4rem))] min-w-0 flex-1 bg-bg">
<main
id="main"
tabIndex={-1}
className="min-h-[calc(100vh-var(--chrome,4rem))] min-w-0 flex-1 bg-bg"
>
{children}
</main>
</div>