feat(TableRow): add focus ring and ariaLabel prop for clickable rows#102
Conversation
…lickable rows Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Original prompt from Kyle
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
role=button on a <tr> overrides its implicit role=row, breaking screen reader navigation of the table grid (cells lose their association with column headers). tabIndex=0 + onClick + onKeyDown + aria-label is sufficient to make the row interactive and keyboard-accessible without breaking table accessibility semantics. Addresses Devin Review feedback on #102. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR aims to improve TableRow accessibility for clickable table rows by adding an optional accessible label prop and styling for keyboard focus, intended to align clickable rows with button-like interaction.
Changes:
- Extend
ITableRowPropswith an optionalariaLabelprop. - Add a
:focus-visibleoutline style for clickable rows. - Update
TableRowto useariaLabel(with fallback toname/id) when the row is clickable.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| lib/molecule/TableRow/types.ts | Adds the new optional ariaLabel prop to the public ITableRowProps type. |
| lib/molecule/TableRow/styles.module.css | Adds a visible keyboard focus ring via :focus-visible styling on clickable rows. |
| lib/molecule/TableRow/TableRow.tsx | Wires ariaLabel into the rendered row for clickable rows (with fallback behavior). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Surfaces the unmerged work on
devin/1777302300-a11y-table-row-button-role(commitac95878) ontomainso it actually ships andwebmainis no longer pointing at an unreachable deep-ui SHA.Changes (rebased onto current
main):TableRowaccepts a new optionalariaLabelprop and applies it to the row when the row is clickable (falls back toname/id).:focus-visible.Why this PR exists
webmain(commit1a4cb4b/ PR #405) bumped.deep-ui-reftoac95878, which:DateRangePickerwork that other in-flight web PRs (e.g. #383) depend on.This PR re-applies that work cleanly on top of current
mainso a single deep-ui SHA contains both. Once merged, web PR #383 will bump.deep-ui-ref+ the submodule pointer to this merged commit.Review & Testing Checklist for Human
main— should be limited tolib/molecule/TableRow/{TableRow.tsx,styles.module.css,types.ts}.Notes
devin/1777302300-a11y-table-row-button-role) is left untouched; can be deleted after this merges.ariaLabelis purely additive.Link to Devin session: https://app.devin.ai/sessions/926c5fa4fe8a4df6997be146cb57a014
Requested by: @kyleknighted