0Pricing
Web Accessibility Academy · Lesson

Layout Tables Are a Trap

Why tables for layout confuse screen readers.

Layout Tables Are a Trap is a free Web Accessibility Academy lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Web Accessibility Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Tables Were Once Used for Layout

Years ago developers built page layouts with the table element. That habit lingers in old code and still causes real accessibility harm today.

Why Layout Tables Hurt

A screen reader treats every table as data. It announces rows, columns, and cell counts for your layout, drowning users in meaningless structure.

Reading Order Goes Wrong

Layout tables often scatter content into cells in a confusing sequence. The visual order and the reading order drift apart, leaving users lost.

Use CSS for Layout

Modern layout belongs to CSS. Reach for flexbox or grid to arrange a page, and keep the table element only for genuine tabular data.

.cards { display: grid; grid-template-columns: 1fr 1fr; }

Flexbox for One Dimension

When you line items up in a row or a column, flexbox is the natural tool. It adapts to content without any table semantics getting in the way.

.row { display: flex; gap: 1rem; }

Grid for Two Dimensions

For rows and columns together, CSS grid gives you a true layout system. It separates how a page looks from what its markup means.

Semantics Stay Clean

With CSS layout, your HTML can use real landmarks like header, nav, and main. Screen reader users get a meaningful map instead of cell counts.

The Last Resort: role=presentation

If you truly cannot remove a legacy layout table, add role=presentation. It strips the table semantics so assistive tech ignores the grid.

<table role="presentation"> ... </table>

Presentation Is a Patch, Not a Plan

Treat role=presentation as a temporary bandage. The real fix is migrating to CSS, which removes the problem instead of merely hiding it.

How to Spot a Layout Table

No caption, no th, and cells holding whole sections rather than values are red flags. That pattern almost always signals a layout table to refactor.

One Table, One Purpose

Ask a simple test of any table: does it present data with rows and columns of related values? If not, it is a layout table and CSS should replace it.

Quick Check

You inherit a page that uses a table purely to position columns of content.

Recap: Tables for Data, CSS for Layout

Never lay out a page with a table. Use flexbox or grid, reserve table for real data, and treat role=presentation only as a stopgap on legacy code.

Frequently asked questions

Is the “Layout Tables Are a Trap” lesson free?

Yes — the full text of “Layout Tables Are a Trap” is free to read here on the web, and the Web Accessibility Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Web Accessibility Academy course, upgrade to CoddyKit PRO.

What will I learn in “Layout Tables Are a Trap”?

Why tables for layout confuse screen readers. You practise Web Accessibility Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Web Accessibility Academy?

No prior experience is required. Web Accessibility Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Layout Tables Are a Trap” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Web Accessibility Academy lesson?

Yes. Every Web Accessibility Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. th, scope, and the caption Element
  2. Row and Column Headers Done Right
  3. Complex Tables: headers and id Pairing
  4. Layout Tables Are a Trap
← Back to Web Accessibility Academy