Making spreadsheets accessible: a checklist of the basics
|Publication date:||7 July 2021|
|Owner:||Analysis Function Central Team|
|Who this is for:||Anyone publishing government statistics in spreadsheets|
For more information on any of these pointers, please see our main guidance: Releasing statistics in spreadsheets.
For more information on how to automate the process of creating accessible spreadsheets, read this blog post: Automatically produce best practice spreadsheets.
What ‘(E)’ means
If a point in the checklist has ‘(E)’ after it, it means it has been interpreted as essential to passing the accessibility regulations.
1. Mark up tables (E)
Tables in spreadsheets need to be ‘marked up’ as tables. Marking up an element (such as a table) in a document or webpage means code is added in the background to help software like screen readers better understand the content. If you do not know how to do this, please see the tables section in the main guidance.
2. Give tables meaningful names
When tables in a spreadsheet document are marked-up they should also be given a meaningful name.
3. Remove merged cells, split cells and nested tables (E)
Merged cells, split cells and nested tables make table structure hard to understand for assistive technology like screen reader software.
4. Remove blank rows and columns within tables (E)
Use row height and column width to create space instead.
5. All tables should have one tagged header row (E)
When you mark-up a table you need to select ‘My table has headers’. Be aware all columns must have text in the header row (or Excel will give it a default name when you mark it up as a table). Also, header names must be unique – a table can’t have two columns with the same text in the header row.
6. Wrap text within cells (E)
It is important to ensure all text is visible and clearly spaced out.
7. Avoid adding filters and freeze panes
If you do need to use filters or freeze panes you should inform users and give instructions on how to turn them off (E). When you mark up a table Excel will automatically make each column heading a filter. Turn this off in the Table Design ribbon.
8. Only leave cells with no data empty in certain circumstances (E)
When cells with no data are left empty it can make it difficult for users of assistive technology to work out where the table starts and ends.
If the following points are met, blank cells should not cause accessibility issues:
- There is only one reason a cell in a table may be left blank.
- The table is marked-up correctly.
- There is a note above the table, in a cell in column A, explaining that some cells are left blank and why.
If there are several reasons a cell in a table may be left blank you will need to describe why a cell has no data.
9. Avoid hiding rows or columns
If you do need to hide some information you will need to give guidance in a cell in column A, above any tables, on what rows or columns are hidden and how to unhide them (E).
10. Columns should be a sensible width
When you mark up tables, Excel will automatically make each column the same width as the text in the header row. This is often too wide. Make the columns narrower, but ensure the text in the header row is still clear.
1. Do not use symbols or superscript to signpost to notes (E)
You should not use superscript text or symbols to signify notes. Instead, whenever possible put information at the point of need or use a letter as shorthand, for example: [unavailable] or [x]. All shorthand or words within a table should be presented in square brackets. The type of shorthand used should follow our updated ‘Using symbols and shorthand in tables’ guidance.
2. Use the word ‘note’ when referring to footnotes
We advise you signpost to detailed footnotes using the word ‘note’ and a number in square brackets, for example: ‘[note 1]’.
If a cell refers to more than one footnote listing each in a separate pair of brackets is best for machine readability, for example: ‘[note 1][note 2][note 3]’.
If you want your spreadsheet optimised for accessibility you can list notes in one set of brackets, like this: [note 1, 2, 3].
3. Avoid putting note markers in specific cells
Whenever possible, put note markers in titles, column headings, row labels or notes columns. If you need to mention notes for specific cells, you should add a notes column to the table, on the right. You should describe which cell or cells the note applies to, for example: ‘[note 1] This note applies to B10, C10 and D10’.
This is not deemed essential for accessibility, but would be considered essential for usability.
In terms of machine readability note markers should only be placed in table titles or note columns. They should not be in column headings or row labels. If fully optimising for machine readability you should supply the data as a CSVW (CSV on the web) or through an Application Programming Interface (API). Notes are supplied differently when you supply data in these forms. More information is in the Metadata worksheets section of the main guidance.
4. Put note text in a notes table on a notes worksheet
It is best practice to avoid putting any information below a table. We advise you to create a worksheet called ‘Notes’. This worksheet should contain a marked-up table that lists all the detailed notes for the spreadsheet.
1. All written content needs to meet the accessibility guidelines
Most of this guidance is essential for accessibility.
2. Links must be accessible (E)
Hyperlink text must be descriptive, not a URL and consistent. For example, it is bad practice to provide lots of links to different destinations with non-specific link text like ‘Find out more’.
If linking to a document the link text should include the type of document and the size.
3. Format text to make it accessible
- Use a sans serif font – serif fonts are more difficult to read, especially for people with dyslexia.
- We advise you to make text at least size 10, best practice would be to make it at least size 12.
- Select the ‘automatic’ colour (unless you have used colour for emphasis or for link text).
- Avoid the use of italic text – this can be difficult for some users to read.
- Avoid the use of cell borders on cells with lots of text in – underlined text is more difficult to read, particularly for people with low vision or dyslexia.
- Avoid highlighting text with a background fill – if you do you will need to check the contrast between the font and the background.
- Make sure all text is horizontal.
4. All worksheets should have descriptive titles which are properly formatted (E)
Each worksheet should have a descriptive title in Cell A1. This should be formatted appropriately. The colour should be ‘automatic’, the font should be sans serif and the size should be slightly larger than the rest of the text on the sheet.
It is best practice for the heading to also be marked-up as ‘Headings 1’ using the ‘Cell Styles’ tool on the ‘Home’ ribbon. This helps assistive technology navigate around the spreadsheet. This is no longer considered essential though as we have found not all assistive technology recognises the heading tags in Excel.
Note: heading tags are well recognised in PDF, Word documents and webpages so are considered essential in these formats.
5. Avoid using symbols in general
As mentioned, symbols should not be used to signpost to notes. They should also be avoided in text whenever possible.
Research by a company called Deque has listed 17 characters considered ‘safe’ to use. These include £, %, & and /. It is also OK to use dashes and slashes in classifications and geography codes as these are needed for consistency.
6. Do not use headers and footers, floating text boxes or floating toolbars (E)
These can fail a number of accessibility guidelines.
7. Do not use visual devices to divide data regions
No visual devices such as colour, shading or patterns should be used to divide up tables.
Depending on how many and what type of visual devices are used, you may fail accessibility guideline 1: perceivable, so they are best avoided.
8. Do not use a background fill
It is better to leave the background of your spreadsheet blank. You can turn off Excel’s automatic grey gridlines on the ‘View’ ribbon if you wish.
9. Do not use colour as the only way to convey a message (E)
Never use colour as the only way to communicate a message.
10. When using colour for emphasis check the contrast (E)
Colour may be used for emphasis but you must check the colour contrast between the text and the background is strong enough to meet the accessibility guidelines. Use the WebAIM colour contrast checker to do this. Remember, legally you need to meet the AA standard.
11. Avoid images in spreadsheets
Images should be avoided as they can disrupt navigation. If you cannot avoid including images, make sure all logos, graphics, charts and any other images within the spreadsheet document have alternative text attached to them.
12. Remove macros
It is difficult to ensure these meet the accessibility regulations. They can also pose a security risk.
1. Give worksheets unique names or numbers (E)
Each worksheet should have a unique tab name that clearly describes the information found in that sheet. If this is not possible, give each tab a number and use a (correctly marked-up) table of contents to describe what is on each worksheet.
2. Remove blank worksheets (E)
Blank worksheets can be confusing as it is not clear if they are meant to be blank or if something is missing.
3. Use cells in column A wisely (E)
The key thing to ensure is that the information a user needs to understand the table is positioned above the table, in a place where users are most likely to read it. Cell A1 on each worksheet should tell a user what information is contained on that worksheet.
Generally, it contains the title of the table on the worksheet. If the table title is very long it is better to break it up and put some of it in cell A2 and A3. The cell in column A, underneath the title, should be used for description – for example: ‘This worksheet contains one table. Some cells refer to notes which can be found on the notes worksheet’.
Information about frozen panes, filters and any symbols or shorthand used within the table should also be presented in a cell in column A.
4. Position tables against the left-hand edges of each sheet (E)
Do not leave a blank column as a gap.
5. Avoid putting content below a table
It is best practice to avoid putting any information below a table.
6. Avoid worksheets with multiple tables
If you do need to have multiple tables please read the Worksheets with multiple tables section of the guidance.
1. Run a spelling and grammar check (E)
Make sure there are no spelling or grammatical mistakes. You can run a spelling and grammar check in Excel – in newer versions it is on the ‘Review’ ribbon.
2. Use the accessibility checker
Newer versions of Excel have a built-in accessibility checker which will flag up any issues. Don’t rely on it completely as it is likely to miss some things and it may bring up things that are not relevant. Treat it like a spelling and grammar check.
3. Add document information (E)
The accessibility guidelines require the title field and information about document language to be complete.
4. Ensure the cursor is in cell A1 of the first worksheet when doing your final save (E)
This means the spreadsheet will open on the first cell of the first worksheet rather than at a random point.