How to make website data tables accessible in a CMS
A table is useful when readers need to compare values across rows and columns. It becomes hard to use when a CMS turns the first row into bold data cells, removes the caption, or clips columns on a phone. This guide shows a content editor what to decide before publication and what to ask a developer when the editor cannot express the structure. The downloadable HTML is a small, fictional example that can be adapted; it is not a claim that pasting code into every CMS will preserve its markup.
Boletolibre editorial team
Published
Open the editable table example
Download the accessible table example (HTML, English)
The example uses a short comparison of three imaginary service options. Replace every label and value with verified information before using it. Its caption names the subject, the top cells are column headers, and the first cell of each data row is a row header. W3C explains that many CMS editors have a header-cell setting, although the controls differ by product. If your editor strips or rewrites the markup, ask the template owner to implement the table there.[1]
Open the HTML file locally to see the result and inspect its source to understand the structure. You may copy the content or code into a suitable publishing workflow, but verify the live result. The accompanying example is not intended as a complete site template, a data source, or an accessibility certification.
Use a table only for a relationship in the data
A data table is for information that makes sense as a grid: for example, comparing the same attributes for several options. It is not a device for placing unrelated blocks side by side. W3C’s table tutorial addresses data grids and advises using CSS rather than tables for visual page layout. Before creating one, ask what a reader should be able to compare and whether a short list or separate cards would be clearer.[1][4]
- Keep one subject per table. Split an inventory with unrelated sections into smaller tables.
- Give every column one consistent kind of value; avoid mixing prices, dates and notes under a vague heading.
- Put one fact in one cell rather than using line breaks to simulate extra rows.
- State the unit and time period in a header or nearby explanation, such as “Price per month, before tax,” if those facts matter.
Design the content for change. If an option is withdrawn, if a price changes, or if a translation adds longer labels, the table must remain truthful and readable. Record the source and owner of each frequently changing value outside the public table. Do not use decorative blanks to create apparent groupings that disappear when read cell by cell.
Mark headers as headers, not bold cells
Visual bolding does not create the relationship between a heading and its data. HTML uses `th` for a header cell and `td` for data. When a table has both a top header row and a first-column header, `scope="col"` and `scope="row"` make those directions explicit. A person navigating cells with a screen reader can then receive the relevant context. The example file uses this straightforward pattern.[1][2]
- In the CMS, choose “header row” or “header cell” controls where available; do not rely on bold text alone.
- Check the first row and the row labels separately: each must describe the cells it governs.
- Do not put an entire paragraph into a header; use a short, specific name and explain qualifications nearby.
- Inspect the published HTML or ask someone who can: a styled `td` is still a data cell.
Not every table needs both kinds of header. If only the columns need labels, a top header row may be sufficient. The key is that readers can identify the meaning of each value without reconstructing the grid by sight. If an editor offers only visual styling and cannot create structural headers, treat that as a publishing limitation to resolve before relying on the table.
Name the table and explain what numbers mean
A short `caption` identifies a table’s overall topic. W3C notes that captions help people find a table and decide whether to read it; they are useful in many cases, but not required for every table in every context. A caption should not be a second paragraph of marketing copy. “Service options and response windows” is more informative than “Our solutions.”[3]
Explain how to interpret values outside the grid or in a concise note. Are the amounts estimates or fixed prices? Are times local to a region? Does “included” mean available to every visitor? Those editorial details matter as much as the tags. If a table needs a long explanation to understand its structure, consider dividing it or asking a developer to provide a properly associated summary for a complex table.
- Caption: identify the subject and scope of the table.
- Headers: name the dimension of comparison and units.
- Notes: qualify exceptions and define abbreviations close to the table.
Keep the relationship intact on small screens
Wide tables can overflow at phone widths or at enlarged text sizes. W3C advises that no content should be cut off and that header-to-cell relationships must survive any responsive format. A horizontal scroll container is one possible approach; the downloadable example uses one without hiding columns. It is not a universal solution: test the actual table with a keyboard, narrow viewport and zoom.[4][5]
- At a narrow width, confirm that every column remains reachable and readable.
- At increased text size or browser zoom, check that values do not overlap or disappear.
- If cards replace the table on mobile, each card must retain its own labels and values.
- Do not substitute an image of a table: it removes the structural relationship and makes updates harder.
If the site’s design system stacks, truncates or reorders cells, ask the developer how it preserves the row and column meaning. A table that looks tidy on a desktop screenshot may still be confusing when read one cell at a time. Test with real translated text, which may occupy more width than the draft language.
Escalate a complex grid instead of guessing
Tables with merged header groups, multi-level headings or irregular cells need more explicit associations than the simple template. W3C documents `scope`, `id` and `headers` patterns for these cases and also recommends breaking complex tables into simpler subjects when possible. An editor should not add arbitrary `scope` values in hopes of fixing a layout; map which header actually applies to each cell first.[1][4]
- Can the table be split into two smaller tables with clear captions?
- Can an ambiguous value be moved into a separate explanatory sentence?
- Does the CMS preserve the needed header structure after saving and publishing?
- Who can inspect the rendered markup and test with assistive technology?
Hand over the content map to the developer: row labels, column labels, any merged groups and the intended reading order. The goal is not to force every comparison into a single grid. A concise paragraph, list or card set may answer the reader’s question more directly, especially when there are only a few values.
Verify the published table
Preview is a useful step, but the live page is the evidence. Open it at a narrow width and at larger text size; check its caption, row and column headings, reading order and every cell value. If possible, navigate the table with a screen reader or accessibility inspector. W3C notes that structural headers let assistive technology associate cells with their context; visual styling alone cannot prove that relationship.[1][4]
- Compare the published words and values with the approved source; remove sample data.
- Confirm that the caption names this table, not a neighboring section.
- Inspect the markup or accessible table navigation for `th` headers and correct associations.
- Retest after a CMS editor, theme or translation update, since transformations can change markup.
Keep a short record of the page URL, content owner, last checked date and any unresolved issue. When the table changes, review the cells and their labels together. A new column can require a new header and a new mobile check; a redesign that turns the table into cards needs a fresh reading-order review.
Sources and further reading
- Tables TutorialW3C Web Accessibility Initiative · Accessed
- Tables with Two HeadersW3C Web Accessibility Initiative · Accessed
- Caption & SummaryW3C Web Accessibility Initiative · Accessed
- Tables: Tips and TricksW3C Web Accessibility Initiative · Accessed
- Tables — W3C Design SystemW3C · Accessed