Skip to content

fix(A11Y): Keyboard operability and tab model - #1190

Open
gjones wants to merge 3 commits into
fix/aria-wcag-aafrom
fix/keyboard-wcag-aa
Open

gjones wants to merge 3 commits into
fix/aria-wcag-aafrom
fix/keyboard-wcag-aa

Conversation

@gjones

@gjones gjones commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Why?

Follow-up to the ARIA labelling work. Several Click UI controls were mouse-only or injected extra tab stops, which fails WCAG 2.2 AA for consuming apps (2.1.1, 2.4.3, 1.4.13).

Summary

  • File upload dropzones, selectable cards, date range grids, and the date picker trigger are keyboard operable
  • Confirmation dialog initial focus moves to the title instead of Confirm
  • Table column resizers use a single roving tab stop (Arrow Left/Right resize; Arrow Up/Down, Home, End move between handles)
  • Grid no longer has a second tab stop on the inner scroll container
  • DatePicker weekday headers render again (weekDays)

Potentially breaking: Tooltip.Trigger

Tooltip.Trigger now renders a <button type="button"> by default, not a div.

That is so tooltip content is available on keyboard focus, not hover only (WCAG 1.4.13).

If you wrap an existing interactive element (Button, IconButton, Link, <a>, or <button>), you must pass asChild. Without it you get a nested button: invalid HTML and a worse accessible name.

// Before (worked because the wrapper was a div)
<Tooltip.Trigger>
  <IconButton icon="info" />
</Tooltip.Trigger>

// After
<Tooltip.Trigger asChild>
  <IconButton icon="info" />
</Tooltip.Trigger>

Plain text or other non-interactive children do not need asChild. EllipsisContent already uses asChild.

Test plan

  • Tab through a resizable table: one resizer stop, then row controls. Arrow Left/Right still resize. Arrow Up/Down / Home/End move between handles.
  • Tab to a default Tooltip.Trigger (text): tooltip opens on focus.
  • Search consuming apps for Tooltip.Trigger wrapping Button / IconButton and add asChild.
  • Tab a Grid: one stop for the widget.
  • File upload empty dropzone: Enter/Space opens the file picker. Nested browse control is not a second tab stop.
  • Selectable cards: wrapper is only a control when it actually is one.
  • Confirmation dialog: opening focuses the title, not Confirm.
  • Date picker / range calendars: trigger and day grid work from the keyboard.

Made with Cursor

gjones and others added 2 commits September 9, 2026 22:16
Tooltip.Trigger now renders a button by default so content is available on keyboard focus. Wrapping Button, IconButton, or a link without asChild nests interactive elements and is a potentially breaking change.

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f1f3180

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clickhouse/click-ui Patch

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

@workflow-authentication-public

Copy link
Copy Markdown
Contributor

Storybook Preview Deployed

✅ Preview URL: https://click-j2lyi1y07-clickhouse.vercel.app

Built from commit: ea30193e179c39dcd31bad1b3ad7ba7cf3db0d9c

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ 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 dff6571. Configure here.

Comment thread src/components/CardHorizontal/CardHorizontal.tsx
Comment thread src/components/DatePicker/DateRangePicker.tsx
Read calendar weekday headers from both weekDays and weekdays so the
DatePicker typechecks on @h6s/calendar 2.2.0. Restore card aria-disabled for
disabled styles without putting wrappers back in the tab order, and update
visual tests to the new keyboard model.

Co-authored-by: Cursor <cursoragent@cursor.com>
@huanglinfei091-cmd

Copy link
Copy Markdown

Hi — I maintain RunBack, an early-alpha CLI that takes a failed GitHub Actions run URL and tries to reproduce that exact failure locally.

I preregistered the earlier Build health checkup / build failure from this PR (run 34430830779, attempt 1) as a compatibility case. The first run reached the same three TypeScript errors but correctly stopped at INSUFFICIENT_EVIDENCE; after adding a general strict tsc parser, the unchanged URL produced SAME_FAILURE with remote/local/matched 3/3/3. The evidence is recorded here.

If you are willing to try v0.1.2-alpha on this or another public failed Ubuntu Actions run, I would value the actual Result, Stage, Cause, and any install friction:

curl -fsSL https://raw.githubusercontent.com/huanglinfei091-cmd/runback/main/scripts/install-release.sh | bash
~/.local/bin/runback doctor
~/.local/bin/runback <failed-run-url>

A failed reproduction or install problem is useful feedback too. Please do not share tokens, secrets, cookies, or private logs. No follow-up is needed if this is not useful for your workflow.

@XOP XOP added the a11y Accessibility improvements label Sep 10, 2026
@XOP

XOP commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

See here:
#1189 (review)

Recommendation is to approach this as a second stage of updates after stabilization of changes in #1189 .
It is also recommended to split this into tiers PRs for more granular control and higher degree of validation.

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

Labels

a11y Accessibility improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants