headers attribute Issue

Issue

Vision impaired screen reader users listen to outputted information, without any visual cues, and HTML 5 currently lacks a mechanism to create accessible complex data tables that sufficiently meet their needs. Screen reader users currently rely on the headers/id mechanism to be able to interrogate complex table data, partly due to poor user agent support for the scope attribute. A machine-recognizable association between cells in a table and their in-the-table critical context is therefore needed. Currently it is impossible to define most complex data tables accessibly in HTML 5.

The purpose of the attribute is to specify the headers for a particular table cell so that they can be queried by a user or announced to provide context when the user navigates along a particular axis. WCAG 2 explains the headers/id technique this way:

"This technique is used when data cells are associated with more than one row and/or one column header. This allows screen readers to speak the headers associated with each data cell when the relationships are too complex to be identified using the th element alone or the th element with the scope attribute."

Status

PENDING REVIEW

The headers designSolution Number 2 (Hierarchical headers with Smart Algorithm), was incorporated into the spec. It seems like it is much improved and will work, as the spec now allows chained headers. PFWG has discussed headers in the past few meetings. They will look to respond again formally, if that's helpful.

Advice Request to PFWG and their Response

Proposed Solutions

1. Allow headers to reference a td

Reinstate headers/id AND their functionality into the spec by specifically stating that headers are allowed to reference a td. Reword the current definition of the headers attribute so that each of the space separated tokens must have the value of the ID value of a th or td element. For full request visit ACTION 72: @headers rewrite deliverable.


2. Hierarchical headers with Smart Algorithm

Write hierarchical/conceptual/nested/chained headers into the spec and use a smart headers algorithm. Reference: Table inspector.


3. New Element to Act as a Label Instead of a Pure Header (A Magic Cell)

Introduce a new element that acts as both a header and data cell (as the editor proposed in bug 5822) - for example, <tl>. The scope attribute would work with both <th> and <tl>. The smart headers algorithm could be applied to this new element. If determining the orientation of scope is problematic with the new element, then the scope attribute could either be a required attribute, or have an implicit orientation (such as row), which can be overriden by the scope attribute. It would also reduce the complexity of the smart headers algorithm if it continued to assume that headers were either at the start of a column or start of a row.


4. aria-labelledby

Write aria-labelledby into the spec.


Issue, Actions, Bug History

Rationale: Why Headers Should be Included

  1. The headers/id technique may seem irrelevant to those with good eyesight because they have access to content relationships at a glance. However, for users with visual impairments, it is vital for comprehension. Without being able to associate header cells to data cells, screen reader users will either have great difficulty, or find it impossible, to orientate themselves in complex and irregular data tables.
  2. The headers/id technique provides needed functionality in more cases than scope/group. Screen readers do not support scope very well. (See the Research section and the User Agent Working Group comments in the Use Case section below.)

  3. No set number of use cases proves a feature should be included or excluded from the spec. The W3C requires that technologies must be accessible. By definition, people with disabilities are a minority. Accessibility features address failure modes that are infrequent, but critical when they occur.
  4. Despite being rare, it's still important to provide mark up so that data cells can unambiguously be associated with their header cells. It's inevitable that there will be complex relationships that must be able to be modeled with markup alone.
  5. In order to apply the new scope/group technique, tables must be restructured. You can't just add markup to an existing table as you can with headers/id. As for rearranging the data table to simplify the problem - this is can not be done with USER generated table created on the fly. The USER wants to view the table like he wants to view it, as it allows them to quickly get an overview in order to make timely decisions.
  6. The headers/id technique may sometimes be used incorrectly but that is true of all markup. Failure by some to implement a standard is not in itself sufficient justification for getting rid of that standard.
  7. On a pure language-complexity basis, 'scope' is more heavyweight than headers. It adds several new terms, an attribute name and multiple values. 'headers' adds just one term and otherwise re-uses core features (ID).
  8. The headers/id technique provides functionality today. It also works in legacy AT. If it is to be worked out of the system, it should not be an abrupt drop. Transition it out with something better in an orderly and graceful manner.
  9. Anyone suggesting not including headers/id should demonstrate that the replacement works better and is in service.
  10. Applicable Design Principles

Rationale: Why Headers Should Not be Included

  1. The scope/group technique handles the majority of use cases.
    • Is there concrete evidence for this? scope/group serves a distinct purpose from headers/id, which are far more widely supported by assistive technologies; the use of one, the other, or both is often necessary, depending upon the complexity of the TABLE.
  2. An insufficient amount of use cases exist to justify headers/id.
    • Where are the statistics to back up this claim? headers/id bindings in TABLEs do exist in the wild, and the scarcity of the use of binding mechanism is not due to a defect in the headers/id or scope and axis models, but merely a lack of implementation by "mainstream" developers and document authors.
  3. Complex tables are very rare on the Web. If something is rare, then it shouldn't be supported.
    • Again, where is the concrete evidence for this claim? Following the argument "If something is rare, then it shouldn't be supported" to its logical conclusion is an extremely troubling and dubious design "principle" -- this markup serves precisely to provide access for a specified user group -- the blind, the legally blind, those with low vision, and those with cognative difficulties whose comprehension is aided by supplemental speech. No, this user group is not statistically overwhelming, but is this (and other) user groups to be punished for a lack of sheer numbers? Persons with disabilities exist, and the W3C has made a commitment to them to ensure that existing barriers are eradicated and that new barriers are not constructed. Even if the number of persons who depend upon the binding of data cells to their headings is not statistically large, markup was added to HTML 4.01 expressly to increase accessibility, and hence the number of disabled individuals who can use the web for educational, informational, and fiduciary reasons will also increase. What constitutes the numeric threshold for "something" which is "rare" to be supported, and who is to decide where that threshold is located? The end product of such logic is that persons with disabilities don't matter, because, in the overall scheme of things, their presence on the web is "rare". In order for an attribute expressly designed for a specific purpose to be deprecated, a superior mechanism than that defined for TABLE accessibility in HTML 4.01 must be retained. The onus isn't on those who depend upon such explicit bindings to "prove" to the HTML WG that they are necessary -- the onus lies squarely on the shoulders of the developers of authoring tools, user agents, and document authors to prove that a superior mechanism, providing an equivalent or enhanced functionality, exists, thereby justifying the consideration of deprecating markup expressly designed to assist persons with disabilities.

  4. The headers/id technique is complex for authoring. Scope/group is easier and less error-prone.
  5. The headers/id technique is sometimes used incorrectly.
    • Author errors/ignorance is not a reason to deprecate an attribute or element.

  6. Adding headers to the specification will cause code bloat.
    • headers were already in HTML 4.01, even if unevenly supported; the claim that it will cause code bloat is a non-sequitor; there are plenty of other newly introduced elements and attributes in the HTML5 draft that actually do cause code bloat. The headers/id binding is not merely just another piece of code, but a mechanism providing essential information to anyone who cannot -- for whatever reason -- perceive the TABLE, which is a purely visual and presentational construct when stripped of the accessibility elements and attributes defined for TABLE.
  7. By the time HTML5 becomes widely used, one would hope assistive technology would support scope/headers. HTML5 actually goes some way towards helping with this, by providing exact algorithms for associating table header cells with data cells, resulting in exactly the same data structures as headers="" provides.
  8. People suggesting including headers/id haven't demonstrated that it is needed. More research is required.
    • Again, where is the evidence for this claim? Simply attempt to read the table-ized results of WBS straw polls and surveys -- a TABLE is the worst means of expressing the information contained therein, due to its inordinate length and the space limitations of individual table cells. If more research is required, then it should be research that proves the contention that headers/id are not needed.
  9. Applicable Design Principles

Advice from Accessibility Authorities

Research

Examples

Use Cases

HTML 4 Reference

A comment in the HTML 4 specification DTD fragment for td and th was clear that if a cell was both a header and contained data, then authors should use td:

<!-- TH is for headers, TD for data, but for cells acting as both use TD -->

This is also clarified in the section on associating header information with data cells:

"Note that it's not always possible to make a clean division of cells into headers or data. You should use the TD element for such cells together with the id or scope attributes as appropriate."

Policies, Guidelines, and Law

Related Blog Posts and References

Related IRC Discussion and Teleconference Minutes

Related E-mail Threads

May 2007

June 2007

July 2007

August 2007

September 2007

October 2007

November 2007

January 2008

March 2008

April 2008

June 2008

July 2008

August 2008

September 2008

October 2008

November 2008

December 2008

February 2009

April 2009

August 2009

Search on Markmail for Related E-mail

Definitions

HTML/IssueTableHeaders (last edited 2009-08-11 13:50:20 by LauraCarlson)