Best Practices

Tables

In this section, we provide guidelines and recommendations for formatting tables.

What are tables?

Tables: In this context, we are referring to data tables, which are tables that include row and/or column header information to categorize content. (Tables that do not have headers are called layout tables.)

File types: .docx, .html, .pdf


Before you begin

Are your tables simple or complex?

A simple table includes a maximum of one header column and/or one header row. A complex table includes more than one header column and/or header row, and may include merged or split cells.[1]

We recommend you make every effort to keep data tables as simple in structure as possible. The more complex the design of a data table, the less accessible it will be for some students using screen-reading technology to access their textbook materials. Screen readers move left-to-right, top-to-bottom, one cell at a time, and because a screen reader does not repeat a cell, merging or splitting cells may affect the reading order of a table.

Who are you doing this for?

This work supports students who:

  • Are blind or have low vision, for example Jacob
  • Have a form of cognitive disability, for example Ann

Ann has a learning disability that makes it difficult for her to concentrate.


What do you need to do?

In the same way that your content hierarchy needs headings and structure, tables need a properly defined structure to be accessible. This means that you must add row and column headers to define the different sections of data. Screen readers read tables horizontally—cell by cell, row by row—and row and column headers help give the context of the data in each cell to students who are blind, have low vision, or have a cognitive disability.

Creating simple tables

A simple table includes:

  1. A table title or caption
  2. Maximum of one row of column headers and/or maximum of one column of row headers
  3. No merged or split cells
  4. Adequate cell padding for visual learners.

Example 1: Creating a Simple Table

The table below is a simple table. Reviewed against the preceding requirements list, this table:

  1. Includes a caption (Spring Blossoms).
  2. Has one row in which cells are tagged as column headers (Colour Family, Bulbs, Shrubs, Trees), and one column (beginning on the second row) in which the cells are tagged as row headers (Pink, Yellow)
  3. Contains no merged or split cells
  4. Has adequate cell padding to provide space buffering around the data in each cell. (Cell padding in this table is set at “10”).
Spring Blossoms
Colour family Bulbs Shrubs Trees
Pink Tulips Flowering currant Ornamental plum
Yellow Daffodils Forsythia Star magnolia

For a student accessing the table through a screen reader, the first row of data following the column headers will be presented along the lines of:

  • Row 2, Colour family, column 1, Pink
  • Bulbs, column 2, Tulips
  • Shrubs, column 3, Flowering currant
  • Trees, column 4, Ornamental plum

By marking the cells and rows that are headers, the screen reader will refer back to those cells so the listener knows what data in each cell refers to. If this table didn’t have any headers, cells would just be read left to right, top to bottom.

How to mark cells and rows as headers

As with section headings, it is not enough to bold or enlarge text in table cells that you want to be marked as headers.

If you are familiar with HTML, you can go into the Text editor and change <td> tags to <th> tags. Row-header tags are are given the scope=”row” attribute and column-header tags get a scope=”col” attribute.[2] See Example 2 for an example of markup for an accessible HTML table.

However, for those not comfortable with HTML, here is how you create table row and column headers in Pressbooks.

  1. Create your table and fill the cells with data.
  2. Select all of the cells that will be your column headers. (This should be all cells in the first row of your table.)
    1. select the table icon from the top menu of the Visual editor: Table icon > Cell > Table cell properties.
    2. set the “Cell type” to “Header cell.”
    3. set the “Scope” to “Column.”
  3. Select all of the cells that will be your row headers. (This should be all cells in the first column of your table, except for the cell in the first row, which has already been marked as a column header.)
    1. Select the table icon from the top menu of the Visual editor: Table icon > Cell > Table cell properties.
    2. Set the “Cell type” to “Header cell.”
    3. Set the “Scope” to “Row.”

How to create a table caption

The Pressbooks Visual editor currently has no options to add a caption to a table, so it has to be done in the Text editor with <caption> tags.

  1. Create your table in the visual editor and fill in all of the data.
  2. Switch to the text editor and find the table you created. (The easiest way to do this is by using [Ctrl/Command] + [F] and searching for words contained in your table.)
  3. Insert <caption></caption> tags after the <table> tag and add your caption in between them. This is demonstrated in the below example.

An example of an inaccessible table header would be one that appears either before or after the table, with no markup connecting the title to the table.

Example 2: Accessible HTML Table Markup

<table><caption>Table 1.1 Spring Blossoms</caption>

<thead>

<tr>

<th scope=”col”>Colour Family</th>

<th scope=”col”>Bulbs</th>

<th scope=”col”>Shrubs</th>

<th scope=”col”>Trees</th>

</tr>

</thead>

<tbody>

<tr>

<th scope=”row”>Pink</th>

<td>Tulips</td>

<td>Flowering currant</td>

<td>Ornamental plum</td>

</tr>

……

</tbody>

</table>

Add a [Skip Table] option

For large data tables, it can be a good idea to add a link which will allow people to skip the content of the table. See Table 2.4 for an example.

Table 2.4. Main Sociological Research Methods. Sociological research methods have advantages and disadvantages.
[Skip Table]
Method Implementation Advantages Challenges
Survey
  • Questionnaires
  • Interviews
  • Yields many responses
  • Can survey a large sample
  • Data generalizable
  • Quantitative data are easy to chart
  • Can be time consuming
  • Can be difficult to encourage participant response
  • Captures what people think and believe, but not necessarily how they behave in real life
Field Work
  • Observation
  • Participant observation
  • Ethnography
  • Case study
  • Yields detailed, accurate, real-life information
  • Time consuming
  • Data are often descriptive and not conducive to generalization
  • Researcher bias is difficult to control for
  • Qualitative data are difficult to organize
Experiment
  • Deliberate manipulation of social customs and mores
  • Tests cause and effect relationships
  • Hawthorne effect
  • Artificial conditions of research
  • Ethical concerns about people’s wellbeing
Secondary Data Analysis
  • Analysis of government data (census, health, crime statistics)
  • Research of historic documents
  • Content analysis
  • Makes good use of previous sociological information
  • Data could be focused on a purpose other than yours
  • Data can be hard to find
  • Taking into account the historical or cultural context of texts

As shown, this link is best placed in a row preceding the column headers. That way, someone using a screen reader will hear the caption of the table before being given the option to skip the table.

For more information about creating same page links, see “How to Link Material” in the BCcampus Open Education Pressbooks Guide.

Attributions

Ann: Original artwork by BCcampus is under a CC BY 4.0 International Licence.

Table 2.4. “Main Sociological Research Methods” was taken from Introduction to Sociology – 2nd Canadian Edition by William Little. It is under a CC BY 4.0 International Licence.


  1. Penn State, "Tables," Accessibility, accessed March 28, 2018, http://accessibility.psu.edu/tables.
  2. "Tables with Two Headers," Web Accessibility Tutorials, accessed January 17, 2018, https://www.w3.org/WAI/tutorials/tables/two-headers/.

License

Share This Book