diff --git a/apps/web/components/Drawer.tsx b/apps/web/components/Drawer.tsx index 71d9473..bccc439 100644 --- a/apps/web/components/Drawer.tsx +++ b/apps/web/components/Drawer.tsx @@ -16,6 +16,8 @@ interface DrawerProps { side?: "left" | "right"; // 无障碍标签(role=dialog)。 label: string; + // 抽屉面板 id:供触发按钮 aria-controls 指向(无障碍关联)。 + id?: string; triggerRef?: RefObject; children: ReactNode; } @@ -27,6 +29,7 @@ export function Drawer({ onClose, side = "left", label, + id, triggerRef, children, }: DrawerProps) { @@ -58,6 +61,7 @@ export function Drawer({