# Tables and Data Specialist reference: Visual Data Grids Without Semantic Markup Part of the `tables-data-specialist` skill. Read this only when the task reaches these sections. ## Visual Data Grids Without Semantic Markup CSS grid and flexbox layouts often display structured data (stats, metrics, KPIs, dashboards, pricing cards) that *looks* tabular or structured visually but uses only `
`/`` elements. Screen readers linearize these into undifferentiated text. ### The Problem ```html
47 Specialized Agents
3 Platforms
``` ### The Fix: Use `
` for Key-Value Pairs When data presents label-value pairs (stat dashboards, profile fields, spec lists, pricing highlights): ```html
Specialized Agents
47
Platforms
3
``` Use CSS `order: -1` on `
` if the value should display above the label visually while keeping the label first in DOM order for screen readers. ### When to Use `` Instead If the data has multiple dimensions (rows AND columns), use a proper `
`. `
` is for flat key-value lists. ### What to Flag - Any CSS grid or flexbox container with 3+ child elements where each child has a "label" and "value" pattern using only `
`/`` - Stats bars, KPI dashboards, pricing highlights, feature counts, metric summaries using only generic elements - Any visual grid of structured data without `
`, `
`, or ARIA table/grid roles ## Validation Checklist ### Structure 1. Is `
` used for tabular data (not layout)? 2. Does the table have a ``, ``, and `` used correctly? 6. For complex tables: are `headers` attributes correct? 7. For merged cells: do `colspan`/`rowspan` have correct header associations? ### Sorting 8. Do sortable columns have `aria-sort` attributes? 9. Is `aria-sort` updated when sort changes? 10. Are sort buttons inside `
` or `aria-label`? 3. Are header cells `
` (not styled ``)? 4. Do column headers have `scope="col"` and row headers `scope="row"`? 5. Are `
` elements? 11. Is the sort change announced (live region or `aria-sort` update)? ### Interactive 12. Do interactive tables use `role="grid"` appropriately? 13. Do interactive elements in cells have descriptive `aria-label` with context? 14. Does the select-all checkbox handle the indeterminate state? 15. Are row selections indicated with `aria-selected`? 16. Are selection count changes announced? ### Responsive 17. Is the table scrollable on mobile with `role="region"` and `tabindex="0"`? 18. Or does the stacked pattern retain header context per cell? 19. Are hidden columns properly hidden (not just `aria-hidden`)? ### Pagination 20. Does pagination have `aria-current="page"` on the current page? 21. Are page changes announced via live region? 22. Is focus managed after page changes? 23. Is the "showing X of Y" text linked via `aria-describedby`? ### General 24. Are empty states communicated with descriptive messages? 25. Are layout tables avoided (or marked with `role="presentation"`)? 26. Do CSS grid/flexbox layouts displaying structured data use `
`, ``, or ARIA roles (not bare `
`/``)? ## Common Mistakes You Must Catch - CSS grid/flexbox layouts displaying key-value data (stats, metrics, KPIs) with only `
`/`` -- use `
`/`
`/`
` for label-value pairs - Using `
` grids styled to look like tables - screen readers cannot navigate them as tables - `
` elements styled bold to look like headers - use `` with `scope` - Missing `
` - screen readers announce "table" with no description - `scope` attribute on `
` elements (only valid on ``) - `aria-sort` on all columns simultaneously instead of just the active sort column - Sort buttons outside the `` (breaks header/button association) - `role="grid"` on non-interactive data tables (adds unnecessary complexity for screen readers) - Responsive tables that hide columns visually (off-screen or zero size) without `display: none`, so screen readers still read them, or with `aria-hidden` alone, so they stay visible - Inline edit controls without `aria-label` context ("Edit" button in 50 rows - edit what?) - Pagination without `aria-current="page"` - screen reader hears identical "1", "2", "3" buttons - Empty tables with no message - user doesn't know if data is loading or missing ## Structured Output for Sub-Agent Use When invoked as a sub-agent by the web-accessibility-wizard, consume the `## Web Scan Context` block provided at the start of your invocation - it specifies the page URL, framework, audit method, thoroughness level, and disabled rules. Honor every setting in it. If the audit context indicates no tables are present, return an empty `findings` array immediately, with a `notes` entry saying no table audit was needed. Do not spend time searching for tables that don't exist. Return only JSON matching `skills/a11y-core/schemas/findings.schema.json` (see `examples/findings.json`) so the wizard can aggregate, deduplicate, and score results. Each finding carries `rule`, `wcag` (for example `1.3.1 A`, or `n/a`), `severity`, `location`, `summary`, `fix` and, when not high, `confidence`. Put the offending markup in `evidence`. **Confidence rules:** - **high** - definitively wrong: `` without `
` or `aria-label`, `
` without `scope`, sortable column without `aria-sort` - **medium** - likely wrong: table structure appears correct but may have header/data association issues that need browser testing to confirm - **low** - possibly wrong: complex `headers`/`id` attribute relationships that need screen reader testing to verify The wizard counts findings from the JSON for its progress announcements, so do not add a prose summary.