Leave Yamada UI a star

Star
Yamada UIYamada UIv1.7.2

Table

The Table is a component that provides features such as column sorting, row selection, and click events.

Source@yamada-ui/table

The Table follows the WAI-ARIA - Table Pattern for accessibility.

Setting an aria-label on the Table allows it to be read by screen readers.

<Table columns={columns} data={data} aria-label="DRAGON BALL characters" />
Copied!

Keyboard Navigation

KeyDescriptionState
ArrowLeftMoves focus one cell to the left.If focus is on the left-most cell in the row, focus does not move.-
ArrowRightMoves focus one cell to the right.If focus is on the right-most cell in the row, focus does not move.-
ArrowUpMoves focus one cell Up.If focus is on the top cell in the column, focus does not move.-
ArrowDownMoves focus one cell down.If focus is on the bottom cell in the column, focus does not move.-
HomeMoves focus to the first cell in the row that contains focus.-
EndMoves focus to the last cell in the row that contains focus.-

ARIA Roles and Attributes

ComponentRole and AttributesUsage
Tablerole="table"Indicates that the element is a table.
aria-rowcountIndicates the total number of rows in the table.
aria-colcountIndicates the total number of columns in the table.
Tr Internalaria-disabledSet to "true" when the row's id is included in disabledRowIds.
aria-selectedSet to "true" if the row is selected, "false" if not selected.
Th Internalaria-colindexIndicates which column the element is in the table.
aria-rowindexIndicates which row the element is in the table.
aria-sortSet to "ascending" for ascending order, "descending" for descending order, and "none" if no order is specified.

Edit this page on GitHub

PreviousStatNextPagingTable