Kanban Table TD
A Kanban board item is a component that represents a single work item or task card within a Kanban board column. Each item typically displays summary information about a task, such as its title, assignee, priority, or due date, and serves as the unit that moves between workflow stages.
This component is designed to be used as a child element within a Kanban column that has role="list". It renders as a <div> with role="listitem" to convey its semantic position within the list, supports an optional accessible label for screen reader identification, and allows consumers to render any content inside it through the children slot.
Example
Task item | Show demo markup
<td class="kanban-table-td">Task item</td>
Usage example
<script lang="ts">
import KanbanTableTD from "./KanbanTableTD.svelte";
import KanbanTableRow from "../KanbanTableRow/KanbanTableRow.svelte";
</script>
<KanbanTableRow>
<KanbanTableTD>Fix login bug</KanbanTableTD>
<KanbanTableTD>Write docs</KanbanTableTD>
<KanbanTableTD>Release 1.0</KanbanTableTD>
</KanbanTableRow>
Show Svelte source
// In your Svelte component:
import KanbanTableTD from "lily-design-system-svelte-headless/components/KanbanTableTD/KanbanTableTD.svelte";
<KanbanTableTD>
<!-- KanbanTableTD content -->
</KanbanTableTD>
Usage
Task card with title and assignee:
<KanbanTableTD label="Fix login bug">
<h3>Fix login bug</h3>
<p>Assigned to Alice</p>
<span>High priority</span>
</KanbanTableTD>
Dynamic task card with data binding:
<KanbanTableTD label={task.title}>
<span>{task.title}</span>
<span>{task.priority}</span>
<span>{task.assignee}</span>
</KanbanTableTD>
Props
label: string (optional) -- accessible label for the card via aria-label
children: slot (required) -- card content (title, assignee, metadata, etc.)
...restProps: any -- additional HTML attributes spread onto the <div> element
Keyboard Interactions
- None directly -- keyboard interaction depends on interactive elements within the card content provided by the consumer
ARIA
role="listitem" -- identifies this as an item within a list container (the parent Kanban column with role="list")
aria-label -- optional accessible name for the card, set from the label prop, allowing screen readers to identify individual cards
When to Use
- Use inside KanbanTable to represent a single work item or task card within a board column.
- Use when each card needs an accessible label and listitem semantics within a list container.
- Use for displaying task summaries including title, assignee, priority, or due date.
When Not to Use
- Do not use outside of a KanbanTable context -- use TableTD or DataTableTD for general tables.
- Do not use for column headings -- use KanbanTableTD instead.
Headless
This headless component provides semantic listitem structure with role="listitem" and optional aria-label for accessible card identification. The consumer provides all visual styling, including card layout, colors, shadows, drag handles, and any interactive affordances.
Styles
The consumer provides all CSS styling. The component renders with a .kanban-table-td class for targeting. No default styles are included — this is a fully headless component.
Testing
- Verify the component renders a
<td> element with class kanban-table-td
- Verify role="listitem"
-- identifies this as an item within a list container (the parent Kanban column with role="list"`)
- Verify aria-label
-- optional accessible name for the card, set from the label` prop, allowing screen readers to identify individual cards
- Verify keyboard interactions work correctly
- Verify pass-through attributes are applied
Advice
- Designers: Design cards with a clear visual hierarchy so that the title, assignee, and priority are scannable at a glance across columns.
- Developers: Always provide a descriptive
label prop so screen reader users can distinguish individual cards without reading all card content.
Implementation Notes
- Renders as a
<div> with role="listitem" for proper list semantics within a parent role="list" container
- Designed to be used inside a Kanban column; the parent column provides the
role="list" context
- Optional
label prop sets aria-label for screen reader identification of the card
- All card content is provided through the
children slot
- Uses props for prop destructuring with rest props spread
- No drag-and-drop behavior built in; consumers implement interaction as needed
Composition
KanbanTableTD is the leaf component in the KanbanTable compound pattern. It is placed inside column containers within KanbanTableBody, where each column uses role="list".
KanbanTable → KanbanTableBody → column (role="list") → KanbanTableTD (role="listitem")
Related components
kanban-table — a kanban board table interactive grid for organizing items by status <table>
kanban-table-body — a kanban board table interactive grid tbody for organizing items by status <tbody>
kanban-table-foot — a kanban board table interactive grid tfoot for organizing items by status <tfoot>
kanban-table-head — a kanban board table interactive grid thead for organizing items by status <thead>
kanban-table-row — a kanban board table interactive grid row for organizing items by status <tr>
kanban-table-th — a kanban board table interactive grid header cell for organizing items by status <th>
table — a table with rows and columns <table>
References
- WAI-ARIA Listitem Role: https://www.w3.org/TR/wai-aria-1.2/#listitem
Canonical contract
Generated from this component's canonical metadata — the machine-checked source the implementations are held to.
Metadata
- Component: kanban-table-td
- PascalCase: KanbanTableTD
- Description: kanban board table interactive grid data cell for organizing items by status <td>
- Status: beta — implemented and unit-tested in all seven frameworks with an axe-clean demo page; not yet exercised in composed flows
- HTML tag: <td>
- CSS class: .kanban-table-td
- Interactive: no
ARIA
role="listitem" -- identifies this as an item within a list container (the parent Kanban column with role="list") aria-label -- optional accessible name for the card, set from the label prop, allowing screen readers to identify individual cards active (Svelte, React and Vue) makes this cell the grid's single roving tab stop — tabindex="0", every other cell -1 — and **never sets aria-selected**: focus is not selection, and announcing every focused cell as "selected" misleads screen-reader users. A grid with real selection sets aria-selected itself, on the row or explicitly on the cell (rest props pass it through). Corrected 2026-10-10; before that active set aria-selected="true" too.
Keyboard
- None directly -- keyboard interaction depends on interactive elements within the card content provided by the consumer
Props
active: boolean (optional, default false) -- the roving tab stop; sets tabindex only, never aria-selected label: string (optional) -- accessible label for the card via aria-label children: slot (required) -- card content (title, assignee, metadata, etc.) ...restProps: any -- additional HTML attributes spread onto the <div> element