Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sidebar): Sidebar component needs SheetTitle and SheetDescription #6713

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Chukwu3meka
Copy link

...#6686

image

Fix to resolve console error for screen readers when using sidebar in mobile screen

Copy link

vercel bot commented Feb 21, 2025

@Chukwu3meka is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@IPJT IPJT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest you use the VisuallyHidden component from radix instead of className="sr-only" as this is the radix way of visually hiding content while preserving it for assistive technology.

That'd give you:

      <VisuallyHidden asChild>
          <SheetHeader>
            <SheetTitle>Sidebar</SheetTitle>
            <SheetDescription>Displays the mobile sidebar.</SheetDescription>
         </SheetHeader>
      </VisuallyHidden>

@bernaferrari
Copy link
Contributor

@IPJT is is literally the same thing...

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants