![]() |
#1 |
Member
![]() Posts: 14
Karma: 10
Join Date: Jul 2015
Location: Hampshire, UK
Device: Pocketbook Aqua 2
|
![]()
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. |
![]() |
![]() |
![]() |
#2 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
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> 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. |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() 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. :-) |
![]() |
![]() |
![]() |
Tags |
accessibility, screen-reader, tables |
|
![]() |
||||
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 |