Skip to content

Commit 6cdccd1

Browse files
fix(web): describe the sheet dialog, drop its dead width class
Radix warned on every open that the dialog's aria-describedby pointed at nothing; a visually-hidden SheetDescription satisfies it. The className="w-72" on SheetContent never applied — the primitive's data-[side=right]:w-3/4 and sm:max-w-sm win — so it goes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RdRwHvDupRLV8GuJpYKzEr
1 parent ffdc5e9 commit 6cdccd1

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎apps/web/src/components/AppHeader.tsx‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
import {
1212
Sheet,
1313
SheetContent,
14+
SheetDescription,
1415
SheetHeader,
1516
SheetTitle,
1617
SheetTrigger,
@@ -276,11 +277,15 @@ export function AppHeader() {
276277
<MenuIcon />
277278
</Button>
278279
</SheetTrigger>
279-
<SheetContent side="right" className="w-72">
280+
<SheetContent side="right">
280281
{/* SheetHeader/SheetTitle carry the panel's own padding and give
281-
the underlying Radix dialog its accessible name. */}
282+
the underlying Radix dialog its accessible name; the
283+
visually-hidden description satisfies aria-describedby. */}
282284
<SheetHeader className="pb-0">
283285
<SheetTitle>Menu</SheetTitle>
286+
<SheetDescription className="sr-only">
287+
Site navigation
288+
</SheetDescription>
284289
</SheetHeader>
285290
{/* min-h-0 + overflow-y-auto so the list stays reachable on
286291
short viewports instead of overflowing the panel. */}

0 commit comments

Comments
 (0)