Skip to content

Commit b87bb11

Browse files
committed
Tables tab through rows and action cells only
1 parent dc2e063 commit b87bb11

File tree

1 file changed

+4
-3
lines changed
  • apps/webapp/app/components/primitives

1 file changed

+4
-3
lines changed

apps/webapp/app/components/primitives/Table.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ export const TableRow = forwardRef<HTMLTableRowElement, TableRowProps>(
7878
return (
7979
<tr
8080
ref={ref}
81+
tabIndex={0}
8182
className={cn(
82-
"group/table-row relative w-full after:absolute after:bottom-0 after:left-3 after:right-0 after:h-px after:bg-grid-dimmed",
83+
"group/table-row relative w-full outline-none after:absolute after:bottom-0 after:left-3 after:right-0 after:h-px after:bg-grid-dimmed focus:focus-custom",
8384
disabled && "opacity-50",
8485
isSelected && isSelectedStyle,
8586
className
@@ -216,11 +217,11 @@ export const TableCell = forwardRef<HTMLTableCellElement, TableCellProps>(
216217
colSpan={colSpan}
217218
>
218219
{to ? (
219-
<Link to={to} className={cn("focus-custom", flexClasses, actionClassName)}>
220+
<Link to={to} tabIndex={-1} className={cn(flexClasses, actionClassName)}>
220221
{children}
221222
</Link>
222223
) : onClick ? (
223-
<button onClick={onClick} className={cn("focus-custom", flexClasses, actionClassName)}>
224+
<button onClick={onClick} tabIndex={-1} className={cn(flexClasses, actionClassName)}>
224225
{children}
225226
</button>
226227
) : (

0 commit comments

Comments
 (0)