Accessibility: is a “tiny” option warranted? (font-size + spacing audit)
Question: TEDY’s concept tables are dense; do we need a new “tiny” accessibility option? Audited Marina/reference-editor vs @helex/ui sizing.
What @helex/ui already has (two orthogonal axes)
- Density (
HelexDensity,libs/ui/src/lib/themes/themes.ts):comfortable(controls 40px, table cell 16/16, gaps 6/12/16/20/32) ·default(32px, 16/16, 4/8/12/16/24) ·compact(24px, 8/8, 2/4/8/8/16 + antdcompactAlgorithm). Driven viaAccessibilityModal→HelexThemeProvider→buildAntTheme/applyThemeCSSVars. - Font size (
HelexFontSize,HelexThemeProvider.tsx):normal14px ·large18px ·extraLarge26px (root<html>font-size +.helex-scaled-*). Both axes only go bigger/looser than baseline exceptcompact.
Marina / reference-editor density (px, base font 14)
Marina + reference-editor both set html{font-size:14px}. the reference platform never drops global font below 14 — it shrinks font only inside nzSize="small" tables (~10.5px).
| Metric | reference-editor | helex comfortable | helex default | helex compact |
|---|---|---|---|---|
| Base font | 14 | 14 | 14 | 14 |
| Control height | 32 (24 small) | 40 | 32 | 24 |
| Table cell padding | 11.2/11.2 (small 5.6/11.2 + font↓~10.5) | 16/16 | 16/16 | 8/8 |
| Card padding | 12 | ~24 | 24 | ~12 |
| Typical row height | small ~27–32 / default ~44 | ~53 | ~53 | ~37 |
Verdict
The opinion is partially right — but as a DENSITY step, not a FontSize option, and only for data-grade tables.
@helex/uicompactis already denser than reference-editor’s default (control 24 vs 32, cell 8 vs 11.2). For ordinary screens, usecompact— no new preset needed.- The only place the reference platform is denser is its small-table mode (~27–32px rows), which shrinks both padding and in-table font — something no
@helex/uidensity does. For big concept tables (the reference platform precedent: a 37,504-row CodeSystem), a denser step buys ~15–30% more visible rows. A narrow, real gap. - Reject a FontSize “tiny” (sub-14 global) — WCAG-adverse; the FontSize axis exists to scale up for low-vision users, and the reference platform never goes sub-14 globally.
If we implement it (recommended shape)
A new HelexDensity 'tiny' (below compact): keep global font 14, compress padding, and shrink font within tables only (mirroring the reference platform’s --*--sm table vars). Proposed tokens (from the audit):
DENSITY_MAPS.tiny = { gapXs:2, gapSm:4, gapMd:6, gapLg:6, gapXl:12, rowPadding:6 }antdComponentSizeFor: tiny → 'small'+compactAlgorithmbuildAntThemetiny overrides:token.controlHeight:24, controlHeightSM:20;components.Table:{cellPaddingBlock:4, cellPaddingBlockSM:4, cellPaddingInline:8, cellPaddingInlineSM:8, cellFontSizeSM:13};components.Card:{bodyPadding:8}. GlobalfontSizestays 14.- Edit sites (
@helex/ui, all additive):themes.ts(HelexDensityunion,DENSITY_MAPS,antdComponentSizeFor,buildAntTheme),settings/AccessibilityModal.tsx(radio +helex.settings.access.tinykey),themes.test.ts. Effort ~½ day.
This is a shared @helex/ui change → needs sign-off (per the leaned-down convention). Cheaper alternative that avoids a global preset: apply antd size="small" + a scoped cellFontSize override on the specific TEDY concept-table components only.