Make table sorting keyboard accessible - #1014
Conversation
|
Warning Review limit reachedNext included review available in 55 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
eea8743 to
d74baa7
Compare
d74baa7 to
ad0d785
Compare
ad0d785 to
ccee8b8
Compare
ccee8b8 to
8320b88
Compare
8320b88 to
582a2ff
Compare
582a2ff to
474cd47
Compare
45bbeb9 to
f51fb31
Compare
f51fb31 to
78e9232
Compare
78e9232 to
434446c
Compare
434446c to
e6b5a32
Compare
e6b5a32 to
3307aa4
Compare
3307aa4 to
ee604cc
Compare
ee604cc to
312636a
Compare
There was a problem hiding this comment.
🟢 Approval recommended
The change is focused, improves accessibility as intended, and includes test coverage for the new keyboard behavior.
Pull request overview
Improves the dashboard table header sorting UI so sortable columns are reachable via keyboard focus and expose sort state via aria-sort, addressing accessibility gaps introduced/observed around the TanStack React Table v9 upgrade.
Changes:
- Wraps sortable header content in a focusable
<button>while keeping placeholder and non-sortable headers inert. - Adds
aria-sortto sortable header cells with correctascending/descending/nonevalues. - Extends table tests to cover keyboard-triggered sorting and placeholder header behavior in grouped headers.
File summaries
| File | Description |
|---|---|
| client/src/webpages/dashboard/components/table/Table.tsx | Adds keyboard-focusable sortable header buttons and aria-sort handling while keeping placeholders/non-sortables inert. |
| client/src/webpages/dashboard/components/table/Table.test.tsx | Adds regression tests for keyboard sorting and grouped-header placeholder inertness. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| {isSortableHeader ? ( | ||
| <button | ||
| type="button" | ||
| className="flex flex-row items-center p-4 flex-nowrap whitespace-nowrap gap-3" | ||
| > | ||
| {headerContent} | ||
| {sortIcon} | ||
| </button> | ||
| ) : ( |
312636a to
bd5443a
Compare
Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019fec69-19ab-77e8-b6f0-85af1ed67eed
Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019fec69-19ab-77e8-b6f0-85af1ed67eed
bd5443a to
94b940a
Compare
Context & Requests for Reviewers
This addresses a CodeRabbit comment from the @tanstack/react-table v9 upgrade. It was a pre-existing issue: our table sorting was not keyboard-accessible.
Tests
Manually tested. Example here:
CleanShot.2026-08-18.at.12.23.51.mp4
(Optional) Rollout Plan
N/A
Checklist
Only check items that apply to this PR; leave the rest unchecked.
If you changed anything user-facing (i.e. user interface or APIs):Did you update the CHANGELOG.md and related docs?
If you changedserver/models/**/{ContentTypeModel,ActionModel,RuleModel,PolicyModel}.ts:Did you update the corresponding history tables and their triggers?
If you changeddb/src/scripts/**and usedCREATE TABLE,ADD COLUMN, orALTER COLUMN:Are as many columns marked
NOT NULLas possible? If some columns can sometimes be null depending on other columns, are thereCHECKconstraints capturing those relationships, and are these also reflected using unions in the associated Kysely types?If you added a new signal inserver/services/signalsService/signals/**:Did you classify every error case as a permanent error (
SignalPermanentError, no retry) or a normal error (retryable)? Any case where the signal can't determine a score should be aSignalPermanentError.