headers attribute Issue
Issue
HTML 5 needs a mechanism that enables people using non-visual user agents to determine which particular data matches with which particular headers in complex and overlaid tables. People who use screen readers listen to information, without any visual cues. They currently rely on the id/headers mechanism to be able to comprehend complex table data.
WCAG 2 explains the id/headers 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
Open
Editor added headers to the spec. HTML 5 now says that "The td element may have a headers content attribute specified".
However, this issue isn't solved by the current spec. The way it is specified only allows the simplest of data tables to be defined accessibly, which defeats the purpose of getting the headers attribute into the specification at all, because it can't do anything that most ATs don't already do by default. Currently implementation is such that complex tables cannot be created using the headers attribute. The language in the current spec is attempting to pacify PFWG. The spec complies with PFWG's advice by paying lip service to headers while dissenting in functional requirements. It is an attempt to circumvent the issue not solve it. The headers attribute in the current specification is of little use, as it can only reference a th, and the th cannot be a hierarchical th. 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 data tables.
As hierarchical headers are not allowed in HTML5, this means that conceptual headers (cells that contain data and have their own header, but act as a header for other cells in the table) must be marked up as a td. As these cells are conceptually headings, the headers attribute should be able to reference the id attribute of these cells.
PFWG's advice stated, "A disability constituency currently uses and depends on this feature: anyone offering to remove it should be expected to demonstrate that the replacement works better and is in service. Dropping 'headers' because 'scope' could afford the same semantics in 'most of the cases' is a wrong decision; now or, taken in isolation, for the future. The id/headers technique provides functionality today. 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."
References:
Bug 5822: The headers attribute should be able to reference a td - Reported by Gez Lemon, June 20, 2008.
The example data table is reasonably simple, and there should be a way of marking it up so that the headers can be queried by a non-visual user agent.
Proposed Two Step Solution
- Reinstate id/headers 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.
Introduce a new type of table cell which automatically acts as both a header and a data cell without any explicit accessibility attributes or without any explicit associations (as the editor proposed in bug 5822). Note: This step doesn't help describe irregular tables and it doesn't work right now with AT, whereas headers/id does.
If headers are ever to be transitioned out of html, do it in an orderly and graceful manner.
HTML WG Actions, Responses, Bug Reports
ISSUE-57: @headers - Raised by Joshue O Connor, July 17, 2008.
ACTION-72: @headers - On Joshue O Connor, July 18, 2008.
Bug 5822 - Reported by Gez Lemon, June 20, 2008.
The editor's message saying header/id is in the spec, March 23, 2008.
ACTION-63: Ensure HTML WG response to 6 Jun 2007 PF WG msg re table headers http://lists.w3.org/Archives/Public/public-html/2007Jun/0145.html - Michael(tm) Smith
ACTION-67: Propose a test case regarding table headers/id - Dan Connolly. Note: The WCAG 2 technique (H43) used for this action has nested headers, which doesn't conform to HTML 4.01 or HTML 5 (although the W3C's HTML validator doesn't pick it up).
@headers on th too or just td? (Test Results) - Dan Connolly
Related Working Group ISSUE-20 Issue 20 addresses only one half of the headers problem. Issue 20 is defined as "Improvements to the table-headers algorithm in the HTML 5 spec". It is commendable to improve the algorithm but issue 20 does not mention retaining id/headers functionality or the need for backwards compatibility. It does not address the bug 5822. The id/headers function is needed today. The id/headers markup works today. It needs to be grandfathered into the spec.
Advice Request to PFWG and their Response
Request to PFWG: headers attribute debate - Laura Carlson, May 27, 2007.
WAI and the PFWG Response (Summary Al Gilman, June 6, 2007): "The genuine requirement that html4:td.headers addresses is broader than just for table cells; a re-engineered solution could deliver both superior usability and authorability. But we are not starting from scratch. There is a disability constituency that currently uses and depends on this feature: anyone offering to remove it should be expected to demonstrate that the replacement works better and is in service. So from an accessibility perspective, dropping 'headers' because 'scope' could afford the same semantics in 'most of the cases' is a wrong decision; now or, taken in isolation, for the future. But 'scope vs. headers' is not the right frame of reference for the future. As the requirement isn't limited to tables, we look forward to a better solution, gracefully migrated to, once the requirements get looked at in the right breadth of view. And if we can together set up the sampling capability, we'd be glad to work on alternative strategies in terms of how one would recode current 'live' examples."
Table of Contents:
Contents
- headers attribute Issue
- Issue
- Status
- Proposed Two Step Solution
- HTML WG Actions, Responses, Bug Reports
- Advice Request to PFWG and their Response
- Rationale: Why Headers Should be Included
- Rationale: Why Headers Should Not be Included
- Advice From Other Accessibility Authorities
- Research
- Examples
- Use Cases
- Policies, Guidelines, and Law
- Related Blog Posts
- Related IRC Discussion and IRC Teleconference Minutes
- Related E-mail Threads
- Search on Markmail for Related E-mail
Rationale: Why Headers Should be Included
The id/headers 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.)
- 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.
- 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.
- 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.
- The id/headers 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.
- 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).
- The id/headers technique provides functionality today. 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.
- Anyone suggesting not including id/headers should demonstrate that the replacement works better and is in service.
- Applicable Design Principles
Rationale: Why Headers Should Not be Included
- The scope/group technique handles the majority of use cases.
- Is there concrete evidence for this? scope/group serves a distinct purpose from id/headers, 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.
- An insufficient amount of use cases exist to justify id/headers.
- Where are the statistics to back up this claim? id/headers 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 id/headers or scope and axis models, but merely a lack of implementation by "mainstream" developers and document authors.
- 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.
- The id/headers technique is complex for authoring. Scope/group is easier and less error-prone.
- The id/headers technique is sometimes used incorrectly.
Author errors/ignorance is not a reason to deprecate an attribute or element.
- 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.
- 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.
- People suggesting including id/headers 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 id/headers are not needed.
- Applicable Design Principles
Advice From Other Accessibility Authorities
User Agent Working Group comments "The 'headers' attribute is supported by the major screen readers used in the world (JAWS, WindowEyes, ??HAL/SuperNova-still waiting for a reply). WindowEyes uses the headers and id attribute combination. WindowEyes does *not* use the scope attribute. JAWS has support for headers/id, row and column span, and the 'axis' attribute. Assistive technologies, browser extensions, and tools that use DOM access also support the headers attribute and expose that information through their accessibility APIs and to their end users with disabilities and to developers. Examples of this include Firefox extensions like FireVox and the University of Illinois Firefox accessibility extension, and developer tools like Parasoft's WebKing and IBM's RAVEN tool. In addition, platform accessibility APIs such as IAccessible2 on Windows, ATK/AT-SPI on Linux, and the Java accessibility API all have functions for getting the row and column headers. The headers attribute, scope attrte, and TH all provided explicit, engineered ways for browsers to get row and column headers and expose that information to assistive technologies through the accessibility APIs. Without these, the browsers and assistive technologies are forced to resort to heuristics such as font styling and location (topmost and leftmost cells), which is insufficient for complex tables with spanned and multiple row/column headers." - Jim Allan.
Headers attribute - "It may be true that it is possible to restructure many complex data tables by adding rowgroup or colgroup elements to the table and by altering the spans of cells in such a way that the scope attribute can specify the header cells for all data cells. I am not convinced but it is true for some of the "classic" examples. That process is complicated and cumbersome. It basically requires rewriting the table. Compare that with the headers/id approach. ANY Table with ANY relationship between heading cells and data cells can be defined directly by adding id attributes and headers attributes to the cells - not touching the structure of the table. ANY table ANY relationship. That is part of the reason why you see many examples of simple tables marked up with headers/id when they are not necessary and simple scope would work. The simple and algorithmic aspects of headers/id is why the screen reader vendors all now support it and none support rowgroup and colgroup. The algorithm the AT vendors would have to implement for the scope/group approach is much more complex to the point that I think it unlikely they would ever support it AND it would not catch everything." - Jim Thatcher
Research
Support for scope and headers attributes in assistive technologies - HTML Working Group.
User Testing footage of header/id combinations, @summary and @longdesc for HTML5 WG - Joshue O Connor
Data table accessibility test - Roger Hudson and Russ Weakley. "At this stage, it appears that id and headers are the most effective way to make complex data tables accessible. Although id and headers are slightly more difficult to code than scope, the apparent poor screen reader support for scope means that this is probably not an effective accessibility option."
Techniques for Accessible HTML Tables - Stephen Ferg.
Headers Example Recommendation - Stephen Ferg.
Collections of Interesting Data Tables - Ben 'Cerbera' Millard.
Feedback on accessibility concerns in HTML5 - Catherine Roy
Examples
http://www.eere.energy.gov/consumer/your_home/water_heating/index.cfm/mytopic=13220
http://www.eere.energy.gov/consumer/your_home/designing_remodeling/index.cfm/mytopic=10220
http://data.bls.gov/GQT/servlet/InitialPage (need to fill out form info to retrieve particular data tables)
http://juicystudio.com/article/html-scope-headers-debate.php#overlaidtable
http://www.ferg.org/section508/accessible_tables_recommendations.html
http://lists.w3.org/Archives/Public/www-archive/2007May/att-0083/czsched.htm
http://www.federalreserve.gov/generalinfo/basel2/docs2005/potentialimpact.htm
TABLE Using id/headers and axis (based on CSS2, Section 17 example)
TABLE Using scope, axis, and speak-headers (based on CSS2, Section 17 example)
More examples and discussion on the Accessify forum.
Data Table Accessibility Test Update - Roger Hudson and Russ Weakley
2003-2007 Security Services Unit Agreement Appendix A - Salary Schedules - New York State Governor's office.
NYSCOPBA Salary Schedules - New York State Governor's office.
Use Cases
Oracle's web-based solutions "all use the headers= attribute and have since roughly 2001/2002. In fact that has been one of our requirements for making our software section 508 compliant."
XStandard "arguably the most standards compliant WYSIWYG editor, automatically inserts the headers attribute to associate headers with data cells. Personally, I would rather it didn't, as it unnecessarily bloats the markup for simple data tables, but they've made the decision based on the fact that assistive technology traditionally has very poor support for the scope attribute, and very good support for the headers attribute. I'm also aware of a few companies that have style guides that insists that data cells are associated with their headers using the headers attribute for the same reason. - Gez Lemon
Fidelity Investments depends heavily on complex tables for displaying product and customer account information. Portions of the web site have been using complex table markup for years to improve accessibility. Unfortunately, most of the examples I am familiar with are behind the customer password. For those with personal Fidelity accounts, look in the Accounts and Trade section...Id/headers are used in dynamic tables for grouping rows and/or columns (e.g. Large Cap Funds, International Funds, etc). Id headers are used on dynamic tables with irregular shapes, where the table provides a "total" row in a larger, more prominent font that will not fit in the regular cell. Cells are then merged in that row, breaking the standard connection to the TH for that column..." - Jeanne Spellman. (Jeanne is in the process of getting permission for us to see samples.)
Policies, Guidelines, and Law
Official United States Postal Service policy (AS-508-A Section 508 Technical Guidelines) are used in statements of work, vendor requirements, both internally and externally. - Norman B. Robinson.
National Oceanic and Atmospheric Administration: National Weather Service, Section 508 policy
Dutch Accessibility Law see section R-pd.11.5 (English Translation via Babel)
Related Blog Posts
Help keep accessibility and semantics in HTML - Roger Johansson
HTML 5, microformats and testing accessibility - Bruce Lawson
Related IRC Discussion and IRC Teleconference Minutes
"html5 doesn't have the concept of chained headers...a cell is either a data cell with headers, or a header cell" - Ian Hickson, June 20, 2008.
I will add @headers issue to tracker shortly (Buzilla 5822) - Josh O Connor, July 10, 2008.
currently implemented in such a way that complex tables cannot be created using the headers attribute. - Laura Carlson, July 10, 2008.
Issue 20 addresses only one half of the headers problem - Josh O Connor and Laura Carlson, July 17, 2008.
Related E-mail Threads
May 2007
Rationale for removing the summary and headers attributes from tables? - Roger Johansson (Tuesday, 1 May)
Re: <font> (was Support Existing Content) - Henri Sivonen (Wednesday, 2 May)
Use of headers and summary attributes (was : <font> (was Support Existing Content) - WebConforme (Friday, 4 May)
Accessibility is for everyone (was : Use of headers and summary attributes) - Philip Taylor (Friday, 4 May)
Testing Accessibility Re: Accessibility is for everyone - Charles McCathieNevile (Monday, 7 May)
Re: Complex Table Examples - Laura Carlson (Thursday, 17 May)
headers attribute debate - Patrick H. Lauke (Saturday, 26 May)
[Fwd: RE: headers attribute debate] - Patrick H. Lauke (Thursday, 31 May)
June 2007
Re: Complex Table Examples - Laura Carlson (Friday, 1 June)
Re: headers attribute (was Re: Form elements) - Sander Tekelenburg (Friday, 1 June)
Re: headers attribute - Anne van Kesteren (Friday, 1 June)
Table accessibility (was Re: headers attribute) - Maciej Stachowiak (Saturday, 2 June)
Raising issues in a way that the editors will pay attention to them - Ian Hickson (Friday, 1 June)
Re: retention of summary attribute for TABLE element - Laura Carlson (Wednesday, 13 June)
July 2007
3.15 Tabular Data Review - Debi Orton (Monday, 16 July)
August 2007
Issues surrounding Tables: backwards compatibility and complex tables - Robert Burns (Friday, 3 August)
HEADERS, FOR whom - any ID? - Leif Halvard Silli (Saturday, 4 August)
Data Table Collections (Research) - Ben 'Cerbera' Millard (Monday, 6 August)
table, DOM interfaces, cell, heading, leader, trailer, header, footer, runner, TABLE, CAPTION, COLGROUP, COL, THEAD, TFOOT, TR, part of my review of 3.15 Tabular data - Robert Burns (Friday, 10 August)
Heuristic Tests for Data Tables (Discussion) - Ben 'Cerbera' Millard
September 2007
Re: Heuristic Tests for Data Tables (Discussion) - James Graham (Tuesday, 4 September)
User Testing footage of header/id combinations, @summary and @longdesc for HTML5 WG - Joshue O Connor (Tuesday, 4 September)
Re: Data Table Collections (Research) - Ben 'Cerbera' Millard (Friday, 7 September)
October 2007
Re: Data Table Collections (Research) - Karl Dubost (Monday, 1 October)
Re: Data Table Collections (Research) - Ben 'Cerbera' Millard (Saturday, 6 October)
Hierarchies with tabular data... - Peter Krantz (Saturday, 13 October)
November 2007
ISSUE-20 (table-headers): Improvements to the table-headers algorithm in the HTML 5 spec - HTML Issue Tracking Issue Tracker (Wednesday, 21 November)
January 2008
Header cell in top left of data tables - Ben Boyle (Sunday, 27 January)
March 2008
Smart span algorithm for table cells - James Graham (Mon, 10 Mar)
Re: several messages about tables and related subjects - Ian Hickson (Sunday, 23 March)
April 2008
<td scope> and <td> using headers+id> as Table Headers - Ben 'Cerbera' Millard (Wednesday, 23 April)
June 2008
@headers on th too or just td? - Dan Connolly (Thursday, 26 June)
July 2008
bug 5822 and 5807 - accessibility related issues - Steven Faulkner (Thursday, 10 July)