From cc131e52f2024ebb2e47e230150d43c5d0fc7905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=D0=97=D0=B8=D0=BC=D0=B8=D0=BD?= Date: Mon, 11 May 2026 21:42:41 +0000 Subject: [PATCH] =?UTF-8?q?fix(a11y):=20Drawer=20always=20renders=20SheetD?= =?UTF-8?q?escription=20=E2=80=94=20silence=20Radix=20warning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ordinis-admin-ui/src/ui/components/drawer.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ordinis-admin-ui/src/ui/components/drawer.tsx b/ordinis-admin-ui/src/ui/components/drawer.tsx index aa1e400..fe26061 100644 --- a/ordinis-admin-ui/src/ui/components/drawer.tsx +++ b/ordinis-admin-ui/src/ui/components/drawer.tsx @@ -58,7 +58,18 @@ export function Drawer({ {(title || description) && ( {title && {title}} - {description && {description}} + {/* Radix Dialog требует accessible description ИЛИ + * aria-describedby={undefined}. Рендерим SheetDescription всегда + * когда есть header: визуально если передан description, sr-only + * fallback иначе — заглушает Radix dev warning + полезно для + * screen reader users. */} + {description ? ( + {description} + ) : ( + + Боковая панель. Нажмите Escape или кнопку закрытия чтобы вернуться. + + )} )} {children}