Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 05-14-2020, 08:00 AM   #1
Clancolin
Member
Clancolin began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Jul 2015
Location: Hampshire, UK
Device: Pocketbook Aqua 2
Question Accessible tables

Hi,
I'd like a little guidance please. I'm creating a long (multiple-row) table, consisting of two colums as part of an epub. The table gives a code and a decode, like this:

Number Weather
00 Dry
01 Wet
02 Sunny

and so on.

I'm confused as the the best way to add accessibility to this. If I do this
<th id="code">
Code
</th>
<th id="weather">
Weather.
</th>
Then I'd want a screen-reader to read out
"Code..00, Weather Dry"
"Code..01, Weather Wet"

I'm using "id" for the table rows, so that, if I hyperlinked from another page to any specific code e.g.code 15, the result would be "code 15 weather snowy"

Does this work?
<tr id="00">
<td scope="row" headers="code" >
00.
</td>
<td headers="weather">
Dry.
</td>
</tr>

The use of "scope" is to try to link the number with the weather type, but I'm not sure that will work. Any assistance would be appreciated. Thanks.
Clancolin is offline   Reply With Quote
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: 1,537
Karma: 7400529
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
Old 05-14-2020, 07:23 PM   #3
Clancolin
Member
Clancolin began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Jul 2015
Location: Hampshire, UK
Device: Pocketbook Aqua 2
Thanks for that, Tex2002ans - that code looks a lot neater! Thanks also for the link. I'm sure I've seen that page before, but whatever I used as a search term, it didn't come up.

I do also tend to get distracted when looking for stuff, as I often find interesting examples or snippits and I end up jumping between editor and examples and run out of time. :-)
Clancolin is offline   Reply With Quote
Reply

Tags
accessibility, screen-reader, tables

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can a page be accessible only via link? bostonquad Workshop 2 10-31-2017 06:27 PM
Links not accessible chaot Feedback 12 02-01-2017 02:08 PM
Accessible PDF to ePub newbiecalibre Conversion 5 12-03-2014 03:43 PM
Kindle for PC collections not accessible rockster Amazon Kindle 1 09-24-2014 02:31 PM
Download page not accessible itimpi Calibre 8 02-11-2009 04:18 AM


All times are GMT -4. The time now is 03:11 AM.


MobileRead.com is a privately owned, operated and funded community.