Repository navigation
Conversation
🦋 Changeset detectedLatest commit: a47e13e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ced04ae. Configure here.
DreaminDani
left a comment
There was a problem hiding this comment.
Two inconsistencies still (feel free to fix elsewhere if not relevant):
- Spacebar doesn't do anything in secondary card buttons
- Hitting "Enter" opens in a new tab on primary card but opens in the same tab on secondary card
Not sure if either of these are intentional. Walkthrough (video has audio):
CleanShot.2026-10-19.at.10.46.56.mp4
Storybook Preview Deployed✅ Preview URL: https://click-n5k5o23yh-clickhouse.vercel.app Built from commit: |
Chromatic Storybook
Built from commit: Statuses as of the end of the run. The build link shows the live review state. |

Description
CardPrimaryandCardSecondarynow matchCardHorizontal(fix(a11y): add keyboard activation and button role to CardHorizontal #1269). A card withonClickand no innerinfoTextbutton orinfoUrllink getsrole="button"(a button for screen readers). Enter and Space click it.tabIndexstays the same. An inner button or link keeps the keys. A card with no action keeps normal keys.onClick, on all three cards. The key code from fix(a11y): add keyboard activation and button role to CardHorizontal #1269 now lives insrc/utils/keyboard.ts;CardHorizontaluses it too. TheCardSecondaryinfo icon isaria-hiddenwheninfoTextis set.Links and tickets
CUI-308 (CUI-305 to CUI-310 burn-down). Follows #1269.
Checklist
Contribution
buildandbuild-storybookwork locally (full pre-PR command from AGENTS.md section 2 passes)Note
Medium Risk
Shared interaction semantics across three public card components change focus order and when
onClickruns (disabled and inner-button cases); consumers relying on old always-focusable or always-clickable behavior may need updates.Overview
Clickable cards (
CardPrimary,CardSecondary, and alignedCardHorizontal) now exposerole="button",tabIndex={0}, and Enter/Space activation when they have a consumeronClickand no competing inner control. Shared logic lives in newclickOnActivationKeyinsrc/utils/keyboard.ts.Focus and roles change by variant: display-only cards are no longer Tab stops; when
CardPrimaryhas aninfoTextinner button orCardSecondaryhas aninfoUrllink, the card stays non-button and keyboard goes to that control.CardSecondaryhides the chevron from the accessible name wheninfoTextis set (aria-hidden).Disabled and click behavior: all three card types skip
onClickwhendisabled.CardHorizontalalso respects explicitonClick={undefined}so only the inner button fires, and refactors body vs inner-button click paths.Tests, Storybook Keyboard stories, Playwright a11y/focus snapshots, a patch changeset, and removed
jsx-a11y/no-noninteractive-tabindexsuppressions for the primary/secondary cards accompany the behavior change.Reviewed by Cursor Bugbot for commit a47e13e. Bugbot is set up for automated code reviews on this repo. Configure here.