Of course a good validated page, thead, tfoot, tbody, summary and I noticed that you should connect tableheaders with tabledata like this:

<table summary="This is a wordtable">
  <thead>
  </thead>
  <tfoot>
  </tfoot>
  <tbody>
    <tr>
       <th id="words">Words</th>
   </tr>
   <tr>
      <td headers"words">Word 1</td>
   </tr>
  </tbody>
</table>

But is there more stuff to consider with these screenreaders?

2 answers

0
points

I suppose you're seeking suggestions for table code, not for general page coding. This is how I'd code the same content:

<table summary="This is a wordtable"><caption>This is a wordtable</caption>
<thead><tr><th scope="col">Row</th><th scope="col">Words</th></tr></thead>
<tbody>
<tr><td scope="row">1</td><td>Word 1</td></tr>
<tr><td scope="row">2</td><td>Word 2</td></tr>
...
</tbody></table>

TFOOT is optional when empty; CAPTION is for sighted users too, if the content of the table is not intuitive; the HEADERS attribute might be a good idea - if there was some more support for the thing. Right now there is not. TH cells belong to THEAD, while TD stuff goes into TBODY or TFOOT.

Answered almost 8 years ago by Dejan Kozina