Skip to content

Commit

Permalink
fix: table column overlapping and aria roles
Browse files Browse the repository at this point in the history
These changes are already proposed in PRs #4844 and #4841 respectively, but
since those PRs are taking a while in review and these changes are required
for other PRs I'm breaking them out here:
- Add missing aria roles to the first two cells in the column. (Not only is
  this correct, but lack of them breaks e2e tests).
- Add max-w-full to each cell, so that the overflow-hidden applies correctly
  and cells that are too narrow are cropped instead of overlapping.

Signed-off-by: Tim deBoer <git@tdeboer.ca>
  • Loading branch information
deboer-tim committed Nov 23, 2023
1 parent 4c62769 commit 7f8f46f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/renderer/src/lib/table/Table.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ function setGridColumns() {
class="grid grid-table gap-x-0.5 mx-5 h-12 bg-charcoal-800 hover:bg-zinc-700 rounded-lg mb-2"
animate:flip="{{ duration: 300 }}"
role="row">
<div class="whitespace-nowrap justify-self-start"></div>
<div class="whitespace-nowrap justify-self-start" role="cell"></div>
{#if row.info.selectable}
<div class="whitespace-nowrap place-self-center">
<div class="whitespace-nowrap place-self-center" role="cell">
<Checkbox
title="Toggle {kind}"
bind:checked="{object.selected}"
Expand All @@ -159,7 +159,7 @@ function setGridColumns() {
? 'justify-self-end'
: column.info.align === 'center'
? 'justify-self-center'
: 'justify-self-start'} self-center overflow-hidden"
: 'justify-self-start'} self-center overflow-hidden max-w-full"
role="cell">
{#if column.info.renderer}
<svelte:component this="{column.info.renderer}" object="{object}" />
Expand Down

0 comments on commit 7f8f46f

Please sign in to comment.