镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

The vendored carousel leaks a listener, steals arrow keys from inputs, and is unnamed to screen readers #441

Description

@guidovizoso

Six defects in app/src/components/ui/carousel.tsx, vendored from the shadcn generator and not yet adapted.

  • :100 — the reInit listener is registered and never removed.
  • :79 — arrow-key handling is capture-phase and calls preventDefault, so it steals Left/Right from any input or textarea inside a slide.
  • :125 — role="region" with aria-roledescription and no accessible name, so a screen reader announces an unnamed region.
  • :140 — the overflow-hidden viewport clips focus rings, and off-screen slides stay in the tab order, so keyboard focus travels to things that cannot be seen.
  • :114 — dead opts.axis fallback: a caller passing axis: "y" is silently overridden.
  • :136 — CarouselContent forwards className to the track rather than the viewport, which is not what a caller would expect.

The keyboard and screen-reader items are the ones worth doing first.

Found during code review of guido/agents-roster-grid and deliberately deferred: real and load-bearing, but a different subject from that branch.

Activity

  1. guidovizoso commented on Sep 8, 2026

    @guidovizoso
    CollaboratorAuthor

    Filed in error; closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions