Skip to content
  • Rate limit · GitHub

    Access has been restricted

    You have triggered a rate limit.

    Please wait a few minutes before you try again;
    in some cases this may take up to an hour.

  • Notifications You must be signed in to change notification settings
  • Fork 337
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/table cells interactive focusable #2194

Rate limit · GitHub

Access has been restricted

You have triggered a rate limit.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/rich-squids-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@skeletonlabs/skeleton": patch
---

bugfix: table cells are not focusable when `interactive` is not set.
8 changes: 4 additions & 4 deletions packages/skeleton/src/lib/components/Table/Table.svelte
Original file line number Diff line number Diff line change
@@ -68,15 +68,15 @@
<table
class="{classesTable}"
class:table-interactive={interactive}
role="grid"
role={interactive ? "grid" : "table"}
use:tableA11y
>
<!-- on:keydown={(e) => onTableKeydown(elemTable, e)} -->
<!-- Head -->
<thead class="table-head {regionHead}">
<tr>
{#each source.head as heading }
<th class="{regionHeadCell}">{@html heading}</th>
<th class="{regionHeadCell}" role="columnheader">{@html heading}</th>
{/each}
</tr>
</thead>
@@ -95,9 +95,9 @@
<!-- prettier-ignore -->
<td
class="{regionCell}"
role="gridcell"
role={interactive ? "gridcell" : "cell"}
aria-colindex={cellIndex + 1}
tabindex={cellIndex === 0 ? 0 : -1}
tabindex={cellIndex === 0 && interactive ? 0 : -1}
>
{@html Number(cell) === 0 ? cell : (cell ? cell : '-')}
</td>