Tables and Data Specialist reference: Visual Data Grids Without Semantic Markup
In the kit: .github/skills/tables-data-specialist/references/visual-data-grids-without-semantic-markup.md.
-
This file as plain text, at
https://letitglow.app/ahg/kit/raw/.github/skills/tables-data-specialist/references/visual-data-grids-without-semantic-markup.md - Everything in the kit
Copy it into ChatGPT or another assistant
Read the plain text first
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 <div>/<span> elements. Screen readers linearize these into undifferentiated text.
The Problem
<!-- PROBLEMATIC: looks structured visually, but screen readers read
"47 Specialized Agents 3 Platforms 52 Prompts" as one long line -->
<div class="stats-grid">
<div>
<span class="stat-number">47</span>
<span class="stat-label">Specialized Agents</span>
</div>
<div>
<span class="stat-number">3</span>
<span class="stat-label">Platforms</span>
</div>
</div>The Fix: Use <dl> for Key-Value Pairs
When data presents label-value pairs (stat dashboards, profile fields, spec lists, pricing highlights):
<dl class="stats-grid">
<div class="stat-item">
<dt class="stat-label">Specialized Agents</dt>
<dd class="stat-number">47</dd>
</div>
<div class="stat-item">
<dt class="stat-label">Platforms</dt>
<dd class="stat-number">3</dd>
</div>
</dl>Use CSS order: -1 on <dd> if the value should display above the label visually while keeping the label first in DOM order for screen readers.
When to Use <table> Instead
If the data has multiple dimensions (rows AND columns), use a proper <table>. <dl> 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
<div>/<span> - Stats bars, KPI dashboards, pricing highlights, feature counts, metric summaries using only generic elements
- Any visual grid of structured data without
<dl>,<table>, or ARIA table/grid roles
Validation Checklist
Structure
- Is
<table>used for tabular data (not layout)? - Does the table have a
<caption>oraria-label? - Are header cells
<th>(not styled<td>)? - Do column headers have
scope="col"and row headersscope="row"? - Are
<thead>,<tbody>, and<tfoot>used correctly? - For complex tables: are
headersattributes correct? - For merged cells: do
colspan/rowspanhave correct header associations?
Sorting
- Do sortable columns have
aria-sortattributes? - Is
aria-sortupdated when sort changes? - Are sort buttons inside
<th>elements? - Is the sort change announced (live region or
aria-sortupdate)?
Interactive
- Do interactive tables use
role="grid"appropriately? - Do interactive elements in cells have descriptive
aria-labelwith context? - Does the select-all checkbox handle the indeterminate state?
- Are row selections indicated with
aria-selected? - Are selection count changes announced?
Responsive
- Is the table scrollable on mobile with
role="region"andtabindex="0"? - Or does the stacked pattern retain header context per cell?
- Are hidden columns properly hidden (not just
aria-hidden)?
Pagination
- Does pagination have
aria-current="page"on the current page? - Are page changes announced via live region?
- Is focus managed after page changes?
- Is the "showing X of Y" text linked via
aria-describedby?
General
- Are empty states communicated with descriptive messages?
- Are layout tables avoided (or marked with
role="presentation")? - Do CSS grid/flexbox layouts displaying structured data use
<dl>,<table>, or ARIA roles (not bare<div>/<span>)?
Common Mistakes You Must Catch
- CSS grid/flexbox layouts displaying key-value data (stats, metrics, KPIs) with only
<div>/<span>-- use<dl>/<dt>/<dd>for label-value pairs - Using
<div>grids styled to look like tables - screen readers cannot navigate them as tables <td>elements styled bold to look like headers - use<th>withscope- Missing
<caption>- screen readers announce "table" with no description scopeattribute on<td>elements (only valid on<th>)aria-sorton all columns simultaneously instead of just the active sort column- Sort buttons outside the
<th>(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 witharia-hiddenalone, so they stay visible - Inline edit controls without
aria-labelcontext ("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:
<table>without<caption>oraria-label,<th>withoutscope, sortable column withoutaria-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/idattribute 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.