Skip to content

fix(a11y): Table sortable keyboard operable - #1241

Merged
XOP merged 4 commits into
mainfrom
fix/cui-307-table-headers-a11y
Oct 8, 2026
Merged

XOP merged 4 commits into
mainfrom
fix/cui-307-table-headers-a11y

Conversation

@XOP

@XOP XOP commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Description

  • in Table sortable headers and headers with onClick render a <button type="button">
  • <th> gets aria-sort, sort icons are aria-hidden, consumer aria-label lands on the button
  • no visual changes except focus ring on keyboard operation

Links and tickets

  • current - CUI-307
  • created follow-up CUI-316 - one common approach to testing for interactive components
  • created follow-up CUI-317 - action buttons focus ring is cut off

Good to know

Checklist

  • Breaking changes? (add migration notes in changesets) No.
  • Visual changes? (specify in changesets) - Focus ring
  • Design review needed? No.

Contribution

  • Sufficient research before PR
  • Self-reviewed the PR
  • Manually tested the changes (when applies - visual confirmation in Storybook): built Storybook, keyboard pass on Display/Table/Sortable, axe panel on Sortable and ResizableColumns
  • build and build-storybook work locally
  • Tests and Stories are aligned with the changes

Not tested: screen readers (VoiceOver, NVDA), Firefox and Safari, a control-plane run against a local build.

Accessibility

  • Keyboard - every action works with Tab / Enter / Space / Esc; focus is visible and returns to the trigger on close
  • Names — every control has a name that includes its visible label; icon-only controls take aria-label
  • Vision — colors come from tokens, focus ring shows, targets are at least 24×24 px

WCAG 2.2 checked: 2.1.1 Keyboard, 2.4.7 Focus Visible, 4.1.2 Name, Role, Value, 1.3.1 Info and Relationships, 1.4.11 Non-text Contrast (focus ring). Screen reader announcements were not tested. axe at desktop width reports one pre-existing minor empty-table-header for the actions column <th>; it is outside this change (CUI-317 covers the related action-button focus ring).

Screenshots

__table-a11y.mov

@XOP
XOP requested review from DreaminDani and ariser October 2, 2026 10:49
@XOP XOP added bug Something isn't working a11y Accessibility improvements labels Oct 2, 2026
@changeset-bot

changeset-bot Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fa8739b

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

Comment thread src/components/Table/Table.module.css
Comment thread src/components/Table/Table.tsx
@XOP
XOP enabled auto-merge (squash) October 8, 2026 12:24
@workflow-authentication-public

Copy link
Copy Markdown
Contributor

Storybook Preview Deployed

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

Built from commit: 136dc28a1441e2398fbfe1507ee2b4a23a0b9546

@workflow-authentication-public

Copy link
Copy Markdown
Contributor

Chromatic Storybook

Check Status Link
Storybook ✅ 655 stories published Open Storybook
UI Tests ✅ 655 tests unchanged Open build

Built from commit: fa8739b73dd4ac8849d44a7014270d43b3ee9b3a · Chromatic run

Statuses as of the end of the run. The build link shows the live review state.

@XOP
XOP merged commit 4c21e6e into main Oct 8, 2026
10 checks passed
@XOP
XOP deleted the fix/cui-307-table-headers-a11y branch October 8, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a11y Accessibility improvements bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants