View Single Post
Old 05-14-2020, 01:51 PM   #2
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Clancolin View Post
I'm creating a long (multiple-row) table, consisting of two colums as part of an epub. [...] I'm confused as the the best way to add accessibility to this.

Number Weather
00 Dry
01 Wet
02 Sunny
Code:
<table>
<thead>
	<tr>
	<th scope="col">Number</th>
	<th scope="col">Weather</th>
	</tr>
</thead>

<tbody>
	<tr>
	<th scope="row">00</th>
	<td>Dry</td>
	</tr>

	<tr>
	<th scope="row">01</th>
	<td>Wet</td>
	</tr>

	<tr>
	<th scope="row">02</th>
	<td>Sunny</td>
	</tr>
</tbody>
</table>
Web Accessibility Tutorials (WAI) has pretty good examples of different tables:

https://www.w3.org/WAI/tutorials/tables/

Just note, stuff like <caption>, <figure>, <figcaption>, don't work too well in many readers... so probably avoid using those.

If you need titles/captions, usually I just add a <p class=""> outside of the <table> itself:

Code:
<p class="tabletitle">Table 1: The Weather</p>
<table>
[...]
</table>
<p class="caption">This is a caption.</p>

Last edited by Tex2002ans; 05-14-2020 at 07:52 PM.
Tex2002ans is offline   Reply With Quote