Learn more about “resize text” and “reflow”
8/29/2022 3:00:00 PM
Editor’s note: The Office of Accessibility is working with subject matter experts as we explore WCAG 2.1. One discussion that comes up is around tables, data, magnification, and reflow. This month we learn from two digital accessibility coordinators:
Together they cover:
Linda starts us off, sharing some reflow basics.
The purpose of resize text 1.4.4 is to enable users to increase text size by 200% without the page display getting messed up. For example: text should not overlap other text or elements and all the information on the page should still display. This passes even if you need to scroll in two directions to reveal it.
The purpose of reflow 1.4.10 is to enable users to zoom content to 400% without having to scroll in two directions. There is no requirement to resize the text to a particular size as in 1.4.4. For some implementations the text may continue to enlarge as the magnification increases.
These two criteria go hand in hand, so you might as well test them together. More information is in:
Next, John’s going to share some specifics about tables.
Sometimes a table is the best way to present data. This helps people reviewing and working with the information. For example, state personnel might use a web application to monitor the status of property files submitted by each county. The appropriate workers might use the application to approve or delete the submitted files after reviewing them. A sortable table is the most efficient way to present the data for every file. It can display attributes of each file. The workers may use the attributes for filtering or sorting the data. The following figure gives an example of how this table can look when viewed on a laptop display, at default 100% magnification in the browser.
In this example, the table has 7 columns, and the people using this application need to view all the columns. The table fits easily on the page when viewed on a notebook display or wider, at 100% magnification.
The entire table will not fit within a screen width on a mobile display, or at greater magnification, without scrolling both horizontally and vertically. And, readers need to have the data presented as a 7 column unit. It would not communicate the information the same way if the second half of this table, for example, moved beneath the first half. The following figure shows how both scroll bars appear when the user magnifies to 200% on a page of the same width.
This application demonstrates how reflow may not make sense when you must use a data table, especially when one or more of the following conditions apply:
Even when you should not reflow a table, you should still reflow related items on the page as needed. The example data table includes two controls above it. One for specifying the maximum number of rows displayed, the other a filtering text field.
When viewing the entire table without horizontal scrolling, as in the first figure, the two controls are in a single row, above the left and right ends of the table.
When needing horizontal scroll bars to display the whole table, as in the second figure, the controls reflow. When reflowing the controls, the maximum number filter appears above the filter text field.
Linda – this covered how our readers use content with magnification and reflow. Do you have recommendations for when to use a table and making them easier to use?
Use tables for two-dimensional information ("data table").
Data tables organize data into rows and columns of related information. The information in each cell has little meaning on its own. It's the topics in a cell's row and/or column header that provides the context and meaning for the cell's content.
For example, the table below is about the price of apples, oranges, and bananas by year. The data cells contain prices related to a particular fruit (column header) in a particular year (row header).
Year | Apples | Bananas | Oranges |
---|---|---|---|
2020 | $4 | $1 | $3 |
2021 | $5 | $2 | $9 |
2022 | $8 | $7 | $6 |
We understand from the related information in the table above:
This is an example of two-dimensional information appropriate to code as an HTML <table>.
Although presentation tables are not prohibited under WCAG 2.0 AA, they are deprecated in HTML5:
Tables must not be used as layout aids. Historically, some web authors have misused tables in HTML as a way to control their page layout. This usage is non-conforming …
Screen readers will correctly identify a presentation table from a data table ONLY if you coded the presentation table correctly (e.g., no <th> elements; no <td> elements with a header or scope attribute). And there are still problems with presentation tables even if you coded them correctly:
Use short descriptive text for the table headers and avoid abbreviations if possible. This helps all readers retain the information especially when scrolling/tabbing through many rows and columns.
Check that the data cells do not contain too much information. If you are using paragraphs or lists in cells, this could indicate you are using the table for presentation rather than data. Consider reorganizing your content as headings, paragraphs, and lists.
Technically, you can code tables using the above structures to be accessible but consider restructuring the information to make it less complex for all readers.
See this Tables Tutorial on appropriate structural markup for simple and complex tables.
Would you like to learn more about the accessibility work being done by Minnesota IT Services and the State of Minnesota? Once a month we will bring you more tips, articles, and ways to learn more about digital accessibility.
Accessibility
Accessibility