@gridkitjs/core v0.7.0
Minor Changes#
-
ac7695f:
DataGridaccessibility fixes, closing gaps found auditing it against the WAI-ARIA grid pattern:- Selecting a cell now announces it (e.g. "name, row 2, selected") via the grid's existing live region. Previously a grid configured with only cell selection gave a screen-reader user no feedback at all when selecting a cell — unlike row and column selection, which already announced counts.
- New keyboard shortcut:
Alt+Enteron a focused, resizable column header sizes that column to its content — the keyboard equivalent of double-clicking its resize handle. Advertised viaaria-keyshortcutsalongside the existing resize/reorder/sort shortcuts, sobuildKeyShortcuts(@gridkitjs/core) now includesAlt+Enterin its output for a resizable column. - Header
<th>cells now setrole="columnheader"explicitly, matching the explicitrole="gridcell"/role="row"already set on body cells and rows, rather than relying on<th scope="col">'s implicit role mapping inside arole="grid"table. - Body
<td>cells now setaria-keyshortcuts="Space Enter"when cell selection is enabled, matching the shortcuts header cells already advertise.
-
ac7695f:
@gridkitjs/corenow exports pure grid logic that previously lived only inside@gridkitjs/react'sDataGridhooks, so a future non-React binding (or any consumer working directly againstcore) can reuse it instead of reimplementing it:clampFocus,nextFocusForKey,HEADER_ROW, and theGridFocus/NavigationModifierstypes — the header/body focus-navigation state machine.intentOfandapplySelectionIntent, plus theSelectIntenttype — reading a click or key press's modifiers into an intent, and applying it to aSelectionState.resolveRows,resolveColumns, andresolveCell— resolving selected ids back to the row/column/cell records behind them, dropping any id whose row or column no longer exists.resolveKeyboardDropTarget— thebeforeIda keyboard column-reorder nudge produces, matching the pointer-drag drop path already inmoveColumnBefore.buildKeyShortcuts(and theKeyShortcutCapabilitiestype) — thearia-keyshortcutsstring for a column header.revertColumnSize— the sizing-state merge a cancelled resize reverts to.
@gridkitjs/react'sDataGridhooks (useGridNavigation,useGridSelection,useColumnDrag,useColumnResize) andGridHeadernow call these instead of defining them locally. No behavior change for a correct caller — this is the same logic, moved.