liveBook · Manning

Table header cell

As explained in Architecting Accessibility

A table header cell is an HTML table cell that identifies a row or column of data.

The native `<th>` element identifies row or column headers. Its `scope` attribute specifies which cells a header applies to, helping screen-reader users keep context while navigating tabular data. section 6.2.2

<table>
  <caption>Opening hours</caption> #A
  <thead> #B
    <tr>
      <th scope="col">Name</th> #C
      <th scope="col">Location</th> #C
      <th scope="col">Opening hours</th> #C
    </tr>
  </thead>
  <tbody> #D
    <tr>
      <th scope="row">Tax Services</th> #E
      <td>Canada Water</td>
      <td>9am till 5pm</td>
    </tr>
    <tr>
      <th scope="row">Income Tax</td> #E
      <td>Birgu</td>
      <td>9am till 1pm</td>
    </tr>
  </tbody>
</table>

An opening-hours table shows column headers with `scope="col"` and row headers with `scope="row"`. section 6.2.2

How Architecting Accessibility covers it

How deep it goes
Defines `<th>` and its `scope` values, then connects header semantics to screen-reader navigation.
Examples
Uses an opening-hours table with column headers and row headers.
What you can do after
Apply native `<th>` elements and `scope` values to identify row and column headers.
How it connects
Connects HTML tables, data cells, the `scope` attribute, and screen-reader navigation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Architecting Accessibility. The section links point to the parts of the book it draws on.