DataTable accessibility mode decision
RzDataTable<TItem> should remain an enhanced semantic table-composition component for future work. It should not evolve into a full ARIA grid unless a separate, explicit grid roadmap accepts the required cell-level keyboard, focus, and screen-reader obligations.
This note is specific to the current DataTable implementation: an SSR shell that serializes TanStack Table configuration into an inert JSON script, initializes a lazy Alpine runtime named Future prompts should preserve native table semantics and improve the current composition model instead of adding A full ARIA grid changes the accessibility contract from document-style table reading to application-style composite widget navigation. If Future DataTable accessibility work should target only the existing DataTable architecture unless a later prompt explicitly expands scope.rzDataTable, and lets consumers author the rendered table structure with RzTable and table subcomponents.Keep semantic table composition
role="grid", role="row", role="gridcell", roving tabindex, or cell-level navigation to RzDataTable<TItem>.ChildContent, typically with RzTable, TableHeader, TableBody, TableRow, TableHeaderCell, and TableCell.headerGroups, rows, footerGroups, and helper APIs for consumer-authored markup.RzDataTable<TItem> declares grid semantics, the component must own a complete keyboard and focus model rather than relying on native table semantics and focusable controls.tabindex or aria-activedescendant, stable row and cell ids, focus restoration after pagination/filtering/sorting changes, and rules for virtual or missing rows.RzDataTable.razor renders a root HtmlElement with data-slot="datatable", an Alpine host with x-data="rzDataTable", lazy loading through x-load, asset and nonce attributes, and a referenced JSON config script.RzDataTable.razor.cs validates required items, config, columns, and row id selector, normalizes columns, enforces unique row ids server-side, and serializes transport JSON into the script rather than large data attributes.RzDataTableTransport.cs transports data, column definitions, initial TanStack state, feature options, row model pipeline names, and rowStructure.rowIdPath.RzDataTableModels.cs supports column ids, accessor paths, header/footer/cell strings, nested columns, sorting flags, filtering flags, global filter flags, and hiding flags.RowIdSelector / rowStructure.rowIdPath to resolve stable, non-empty, unique row ids for TanStack getRowId.rzDataTable.js reads the script config, normalizes accessors, builds TanStack Table, exposes rendering projections, refreshes derived state, and dispatches namespaced custom events.x-flexrender directive and the runtime _flex helper.table-runtime.js exports rzDataTable, and componentBundleManifest.js maps rzDataTable to table-runtime.RzTable renders a real table inside a scroll container, while table subcomponents default to native thead, tbody, tr, th, td, caption, and tfoot elements.aria-sort on header cells through sort.ariaSort(header). DataTableSortToggle binds disabled state, a dynamic next-action aria-label, a data-sort-direction hook, and click handling to sort.toggle(header).aria-label defaults, checked/disabled bindings, indeterminate state effects, and change handlers that update TanStack row selection state.DataTableSelectionCell and DataTableSelectionHeaderCell preserve semantic td and th defaults while composing the checkbox controls.aria-disabled, remove disabled controls from tab order with tabindex="-1", and mark the current page with aria-current="page".rz:datatable:ready, rz:datatable:state-changed, rz:datatable:selection-changed, rz:datatable:page-changed, rz:datatable:sort-changed, rz:datatable:filter-changed, and rz:datatable:column-visibility-changed with serializable state payloads and stable component ids.src/RizzyUI/Components/DataTable/RzDataTable/RzDataTable.razor and RzDataTable.razor.cs for SSR shell attributes, config serialization, row id validation, and public parameters.src/RizzyUI/Components/DataTable/RzDataTable/RzDataTableModels.cs and RzDataTableTransport.cs for config, column, initial-state, row-structure, and transport changes.src/RizzyUI/Components/DataTable/RzDataTable/DataTableSortToggle.razor, DataTableSortIcon.razor, selection checkbox components, and selection cell components for focused control semantics.src/RizzyUI/Components/DataTable/RzTable/ only when native table subcomponent semantics, attributes, or documentation examples require adjustment.packages/rizzyui/src/js/lib/components/rzDataTable.js for TanStack state, helper APIs, event payloads, row id validation, and any future announcements or focus helpers.packages/rizzyui/src/js/bundles/table-runtime.js and packages/rizzyui/src/js/runtime/componentBundleManifest.js only if runtime ownership changes are explicitly required.src/RizzyUI.Docs/Components/Pages/Components/DataTableInfo.razor and this design note for consumer guidance and accessibility documentation.src/RizzyUI.Tests/Components/DataTable/RzDataTable/RzDataTableTests.cs plus any future browser-level tests for behavior that bUnit cannot observe.aria-sort when rendering sortable headers, and keep row ids stable.RzDataTable<TItem>. If an application-style grid is needed later, design it as a separate effort with a complete APG grid contract and dedicated tests.data-slot, Alpine host attributes, config script id, nonce, no large payloads in data attributes, and x-load behavior.aria-sort guidance, checkbox labels, checked/disabled/indeterminate bindings, and pagination aria-current/aria-disabled behavior.rz:datatable:* events emit stable component ids and serializable state slices for sorting, selection, pagination, filters, and column visibility.table-runtime, manifest ownership, and CSP-safe alternatives for examples that currently use inline Alpine expressions.