Build an accessible virtualized data grid: sticky header, sorting, column resizing and keyboard cell navigation

hardAbout 70 minutesUpdated CodingProreactvirtualizationaccessibilityaria-gridkeyboard-navigationdata-grid
Not solved

Share this question

Problem

Admin panels, trading screens and spreadsheets all need a table with thousands of rows that stays fast, can be sorted and resized, and works with a keyboard and a screen reader. Each feature is simple alone; together they fight. Virtualization removes rows from the DOM, but keyboard focus needs them there. A sticky header changes which rows count as visible. Resize handles live inside header cells that also sort on click. Build the grid.

  • rows are objects with a unique id. columns are { key, header, width?, sortable?, minWidth?, maxWidth? } (defaults: width 120, minWidth 40, maxWidth 600). Each cell shows String(row[column.key]).

Ref. UR-1439 · © UIRound · uiround.com/questions/build-an-accessible-virtualized-data-grid-sticky-header-sorting-column-resizing-and-keyboard-cell-navigation

Stuck? Take a hint

Try it in the editor

Run your code as often as you like. Submitting it to the full test suite is part of Pro.

Private, and saved in this browser as you type. All your notes are on My lists.

Every question and answer7 days, one payment