Data Tables Do Not Always Need Markup for Header Cells?

Deque Systems

By Deque Systems

June 9, 2014

Data Tables Do Not Always Need Markup for Header Cells?

In a recent thread my attention was drawn to a statement in the HTML5 specs that suggests some data tables may not need any markup for header cells after all. The line reads: “Observe the lack of headers, which are not necessary in such a table” with reference to the sample sudoku puzzle markup [1]. Here is the table:

Today’s Sudoku

1 3 6 4 7 9
2 9 1
7 6
2 4 3 9 8
5 9 7 1
6 5 2
7
9 8 2 5

Only by reviewing the code one can see blocks of 3 rows and 3 columns within the 9×9 grid … this is created by using colgroup and tbody and demarcating them with distinguishable borders. With no markup for column / row header cells or a description (like a summary), a non sighted user cannot figure out what this table portrays. The screen reader will of course announce the cell’s coordinates as it does for any table but that’s insufficient for comprehending and navigating the data table meaningfully using today’s screen readers. The WCAG-WG thread, “Failure to provide role=presentation on a layout table” suggests this table or grid should be within a form [2]. All cells should have a title or aria-label. Pre-filled cells may be ‘readonly’ with the label indicating this while the other cells are editable. And surely the grid will benefit with a description (using ARIA, for instance) that indicates that rows and columns are organized into blocks. The table should not have role=”presentation” … thereby enabling users to navigate the grid using table navigation when they choose to. A crossword puzzle is similar. Borth are essentially interactive components and are meant to be well, for lack of a better term, “consumed” by users as such. When rendering the solution for a puzzle, all cells should be readonly.

Conclusion:

That statement in the HTML5 specs that suggests some data tables do not need any header markup is ominous. I believe this will encourage content authors / developers to take liberties while marking up any data table and simply say they believe the table does not need any row/column header markup or caption/summary etc and point to this puzzle as an example.

Reference:

  1. 4.9 Tabular data- HTML5
  2. WCAG-ISSUE-23 (DavidMacD): We should consider a new “Failure to provide role=presentation on a layout table”
Classical sudoku puzzle
… It’s a grid 9 squares wide and 9 squares deep. The grid is further divided by the darker lines into nine 3 X 3 square ‘boxes … from Wikipedia

Created by Sailesh Panchang, Principal Accessibility Consultant Deque Systems | June 4, 2014

Deque Systems

Deque Systems

Deque is the global leader in digital accessibility, helping the world’s top enterprises build inclusive products, services, and experiences and achieve lasting compliance. Recognized by leading industry analysts for its AI-powered tools, comprehensive services, and developer-trusted solutions, Deque delivers the industry’s most complete accessibility offering. The Axe platform, anchored by Axe-core, has more than 3 billion downloads and 875,000 installed extensions, making it the global standard for accessibility testing. As a pioneer of people-first accessibility, Deque applies a human-in-the-loop approach that blends expert insight with AI innovation to advance its mission of digital equality for all.

More on this topic

Distinguishing between ARIA and native HTML attributes

jeremy katherman
March 11, 2024 By Jeremy Katherman

As a developer, you want to create more inclusive and accessible digital experiences for your users. Great! It’s possible, however, that you might be feeling…

Read Article
choice

The Complete Guide to Accessibility for WordPress Websites

May 7, 2020 By Ross Johnson

With WordPress powering over 42.9% of all websites, it’s hard to pinpoint another piece of software that has had a greater impact on the state…

Read Article
wordpress