Skip to content

Missing Description Warning in Shadcn UI Sheet Components

The Problem

When using Shadcn UI's Sheet component, you may encounter this console warning:

log
Warning: Missing `Description` or `aria-describedby={undefined}` for {DialogContent}

Despite not using Dialog components directly, the warning appears because:

  1. Shadcn's Sheet is built atop Radix UI's Dialog primitives
  2. The underlying DialogContent requires accessibility descriptors for screen readers
  3. Both the SheetDescription child component and aria-describedby prop are missing

Why This Happens

Radix UI enforces accessibility standards requiring either:

  • A descriptive DialogDescription/SheetDescription component
  • Explicit aria-describedby attribute (even if set to undefined) Without these, screen readers can't properly announce dialog/sheet content.

1. Add Descriptive Text (Best Practice)

Include meaningful content within SheetDescription, optionally hiding it visually with sr-only:

jsx
<SheetContent side="right">
  <SheetHeader>
    <SheetTitle>Navigation Menu</SheetTitle>
    <SheetDescription className="sr-only">
      Site navigation links and actions
    </SheetDescription>
  </SheetHeader>
  {/* Your content */}
</SheetContent>

2. Explicitly Undefined ARIA (For Simple Sheets)

If no description is needed, suppress the warning directly:

jsx
<SheetContent 
  side="right" 
  aria-describedby={undefined} // Suppresses warning
>
  {/* Your content */}
</SheetContent>

Accessibility Note

Only use aria-describedby={undefined} when the sheet's purpose is visually obvious. For complex sheets, always provide descriptions.

How Sheet Relates to Dialog

Shadcn's sheets inherit dialog requirements from Radix UI:

ComponentUnderlying PrimitiveDescription Requirement
SheetContentDialogContentRequired via description/label
DialogContentDialogContentSame accessibility rules

Best Practices

  1. Always provide descriptions when content isn't self-explanatory
  2. Use sr-only for visual hiding rather than omitting descriptions
  3. Avoid empty descriptors like <SheetDescription /> which create empty aria references
  4. Include titles with SheetTitle for full accessibility context

Why This Fails Without Solution

jsx
{/* Warning triggered: Missing accessibility attributes */}
<SheetContent>
  <div>My Content</div>
</SheetContent>

The component hierarchy demands accessibility attributes that aren't present.

Key Takeaways

  • Shadcn's sheets inherit dialog behavior—always include accessibility elements
  • Prioritize hidden descriptions (sr-only) over disabling attributes
  • Suppress warnings only when accessibility impact is minimal
  • Combine SheetTitle + SheetDescription for full accessibility coverage

For more details, see:
Radix UI Dialog Documentation
Shadcn Sheet Documentation