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

Calendar Month & Year select Aria-hidden bug #902

Open
Jels02 opened this issue Nov 7, 2024 · 1 comment
Open

Calendar Month & Year select Aria-hidden bug #902

Jels02 opened this issue Nov 7, 2024 · 1 comment

Comments

@Jels02
Copy link

Jels02 commented Nov 7, 2024

Describe the bug

When opening a focusable component within the Calendar component header, an error will display in the browser console, about the ancestor (The calendar header) containing the "aria-hidden=true" prop but the child being focusable.

Reproduction

Can be reproduced on the shadcn-svelte docs site: https://shadcn-svelte.com/docs/components/calendar#month--year-selects
It's not super consistent, on both the docsl site and on my project that I encountered the bug in, but I can reproduce it consisently in my browser (tested on Arc, Chrome and Edge):

  • open console tab
  • reload page
  • switch to elements tab (before interacting with calendar)
  • open the month or year selecter

If you have issuse with reproducing let me know and I will attach a video.

Logs

No response

System Info

System:
    OS: macOS 14.6.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 34.83 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.4.1 - /opt/homebrew/bin/node
    npm: 10.8.1 - /opt/homebrew/bin/npm
    pnpm: 9.5.0 - /opt/homebrew/bin/pnpm
    bun: 1.1.21 - /opt/homebrew/bin/bun
  Browsers:
    Chrome: 130.0.6723.116
    Edge: 130.0.2849.68
    Safari: 17.6
  npmPackages:
    @sveltejs/kit: ^2.0.0 => 2.7.4
    bits-ui: 1.0.0-next.46 => 1.0.0-next.46
    formsnap: 2.0.0-next.1 => 2.0.0-next.1
    lucide-svelte: ^0.454.0 => 0.454.0
    mode-watcher: ^0.4.1 => 0.4.1
    svelte: ^5.0.0 => 5.1.9
    sveltekit-superforms: ^2.20.0 => 2.20.0

Severity

annoyance

@huntabyte
Copy link
Owner

It's not consistent because it's more of a timing thing that chrome is freaking out about. We remove the aria-hidden attribute basically at the same time as we focus on the element. I'll look into seeing how we can ensure they are never taking place at the same time.

This is an issue for Bits UI, so I'm going to move it there.

@huntabyte huntabyte transferred this issue from huntabyte/shadcn-svelte Nov 9, 2024
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

No branches or pull requests

2 participants