UKHSA statistics production hub

GitHub icon

Creating clear and accessible spreadsheets

Main messages

This page is based upon a range of sources from across government and beyond. For a reading list, please see the sources section towards the bottom of this page.

Accessibility and different publication formats

Why is accessibility important?

Accessibility means making content clear and easy to find, access, use and understand, for people of all access needs and abilities. Good accessibility brings benefits to all users, improving the quality and value of our statistics, and the trust users have in us as an organisation. It is particularly important for people with disabilities, remembering that 20% of the working-age population report having a disability.

For public bodies, making online content accessible is also now mandated by law. The Public Sector Bodies (Websites and Mobile Applications) Accessibility Regulations 2018, building on the Equality Act 2010, requires that all content published online by public bodies must be accessible in ways that make them “perceivable, operable, understandable and robust”. In the Code of Practice for Statistics, there is a similar requirement that data and related guidance should be easily accessible to users, considering the needs of a range of users, using accessible communication formats.

Publication formats

There are 3 main types of tables that might be produced, each of which lend themselves to different publication formats. You should first consider which of these formats are the most appropriate for what you are trying to achieve through the presentation of your data.

Demonstration tables

These are used to help make or reinforce a particular point in a clear and simple way. They are best placed in the body of a report so that users can access the information quickly, and do not need to leave the page to find it.

Reference tables

These are used to provide more detailed data for users to see, at a level that might be too much for including in the body of a report. They should be provided alongside a report in an accessible ODS spreadsheet format.

Machine readable datasets

These are specifically used to allow users to carry out more detailed analyses of their own on the data, or for merging with other datasets. They are best provided in a CSV spreadsheet format that is optimised for machine readability, for example, to load into R or Python.

It is important to further note the distinction between reference tables and machine readable datasets, and their different accessibility requirements. Specifically:

XLS and XLSX files should be avoided in all cases as they are neither as accessible as ODS files nor as optimised for machine readability as CSV files.

Note that while machine readable datasets are not subject to accessibility legislation, this does not mean that you should ignore usability. Equally, when presenting data in ODS format, you should still try to bear good machine readability in mind, so that users can load your data into analytical software should they wish to do so.

Detailed guidance for accessible reference tables

The main focus of the current guidance is on reference tables as those will be used for most statistical releases.

The guidance in this section is derived from multiple sources which contain more detail than that presented here. In particular, see:

Note that we will only focus on the more common issues we tend to observe and the citations provided may help you find more exhaustive advice. UKHSA colleagues can contact us via UKHSA_HOPSTATS@ukhsa.gov.uk for any specific questions not answered here.

Many of the same principles presented here will also apply to demonstration tables found within reports and to machine-readable datasets. UKHSA colleagues can again contact us for advice on these if needed.

For an example of what an accessible reference table workbook might look like, click the download button below. (The Government Analysis Function have also provided examples of their own.)

In the sections to follow, we give detailed guidance on what you need to do to make a spreadsheet accessible. In each sub-section, a checklist of key points is provided first. More detailed information is then given beneath each checklist to explain each point.

Tools for automating accessibility

Some tools have been developed that can help automate the production of accessible reference tables, such as the ‘a11ytables’ (accessibility tables) package for R, and the ‘gptables’ (good practice tables) package for Python. Both have been produced by the Government Analysis Function. These are not intended to produce perfectly accessible tables, so do still require human input and review, but they may help automate many of the required features, in line with the principles of Reproducible Analytical Pipelines (RAP).

For UKHSA colleagues wanting support on implementing these packages, please contact UKHSA_HOPSTATS@ukhsa.gov.uk.

Formatting a workbook

Checklist

A workbook is a file that contains multiple worksheets (tabs). Every workbook should:

Formatting worksheets within workbooks

Checklist

By worksheet, we mean each tab of a workbook. Every worksheet should:

Formatting tables within worksheets

Checklist

By table, we mean the group of cells containing data, including the header row. Every table should:

Formatting cells within tables

Checklist

Some formatting requirements may apply to individual cell contents. Cells should:

Sources

  1. Central Digital and Data Office: Creating and sharing spreadsheets
  2. Central Digital and Data Office: Record information about data sets you share with others
  3. Central Digital and Data Office: Tabular data standard
  4. Central Digital and Data Office: Understanding accessibility requirements for public sector bodies
  5. Equality Act 2010
  6. Government Analysis Function: Making analytical publications accessible
  7. Government Analysis Function: Releasing statistics in spreadsheets
  8. Government Analysis Function: Using symbols and shorthand
  9. GOV.UK: Content design: planning, writing and managing content
  10. ODI Leeds: Open data tips
  11. Office for National Statistics: Accessibility
  12. The Public Sector Bodies (Websites and Mobile Applications) Accessibility Regulations 2018
  13. UK Statistics Authority: Code of Practice for Statistics