The Kas RT cash book on the Balai’s board: click or Tab to any cell, and the HTML standard’s header algorithm scans left then up, showing the headers Mr…
Why it matters
Dashboards, price tables, watch rosters: tabular data is everywhere. A screen reader reads one cell at a time, so the only thing tying a number to its meaning is the headers the browser recognises. <th>, scope and <caption> are cheap, and without them the table is a stream of numbers.
The key idea
A cell’s headers are searched for: to the left and up
Common mistakes
Headers look bold on screen, but the SR still reads cells with no context Bold is only CSS. A screen reader only recognises <th> (or role="columnheader"/"rowheader"). Use real <th>s, then style them with CSS.
The SR says only one header, though the table has row and column headers With no scope, a <th> is a row header only if its column has no <td> at all (and a column header if its row has none). One "Total" row or an empty corner written as <td> is enough to switch it off. Add scope="col" and scope="row".
The SR announces a noisy "table, 3 columns" though the table only lays things out Lay out with CSS grid or flex. If an old layout table cannot go yet, give it role="presentation" so its rows and columns are not announced. <table> is only for tabular data, and tabular data needs a <table>: a grid of <div>s is not announced as a table at all.
Try it in this playground
In All td, click cell 1240 Its badge is 0 and Mr. Sugeng only hears "1240". The bold row is no header.
Move between cells with the arrow keys Moving columns, Mr. Sugeng only says the column header that changed; moving rows, the row header.
Make 1240 heard with its month and column Make the month column <th> (or scope="row"), then click 1240: "Maret, Masuk, 1240".
Write a <caption> into the table The table’s plate shows its name: that is what is heard on entering the table.