Merge branch 'fix/mobile-sidebar-a11y-title' into 'main'
fix(a11y): add hidden SheetTitle к MobileSidebar (Radix warning) See merge request 2-6/2-6-4/terravault/ordinis!200
This commit is contained in:
@@ -27,7 +27,7 @@ import {
|
|||||||
useReviewsBadgeCount,
|
useReviewsBadgeCount,
|
||||||
useWebhookSubscriptions,
|
useWebhookSubscriptions,
|
||||||
} from '@/api/queries'
|
} from '@/api/queries'
|
||||||
import { Sheet, SheetContent } from '@/ui'
|
import { Sheet, SheetContent, SheetTitle } from '@/ui'
|
||||||
import { ThemeSwitch } from '@/components/layout/ThemeSwitch'
|
import { ThemeSwitch } from '@/components/layout/ThemeSwitch'
|
||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
@@ -533,6 +533,14 @@ export function MobileSidebar({ open, onClose }: { open: boolean; onClose: () =>
|
|||||||
size="md"
|
size="md"
|
||||||
className="!w-[260px] !max-w-[260px] !p-0 !gap-0 flex flex-col bg-surface"
|
className="!w-[260px] !max-w-[260px] !p-0 !gap-0 flex flex-col bg-surface"
|
||||||
>
|
>
|
||||||
|
{/* Hidden title — Radix DialogContent (which Sheet wraps) требует
|
||||||
|
DialogTitle для screen reader а11y. Визуально не нужен (logo
|
||||||
|
block внутри SidebarContent уже служит heading), поэтому
|
||||||
|
sr-only. Без этого Radix кидает dev-mode warning + screen
|
||||||
|
reader users не понимают что за dialog открыт. */}
|
||||||
|
<SheetTitle className="sr-only">
|
||||||
|
{t('nav.menu', { defaultValue: 'Меню навигации' })}
|
||||||
|
</SheetTitle>
|
||||||
<SidebarContent sections={visibleSections} auth={auth} onNavigate={onClose} />
|
<SidebarContent sections={visibleSections} auth={auth} onNavigate={onClose} />
|
||||||
</SheetContent>
|
</SheetContent>
|
||||||
</Sheet>
|
</Sheet>
|
||||||
|
|||||||
Reference in New Issue
Block a user