W3C home > Mailing lists > Public > public-html@w3.org > August 2007

table, presentational attributes, 2-D 2d 2 dimensional cells, data, header,heading, attribute inheritance, TABLE, CAPTION, COLGROUP, COL, THEAD, TFOOT, TR, part of my review of 3.15 Tabular data

From: Robert Burns <rob@robburns.com>
Date: Thu, 9 Aug 2007 21:59:57 -0500
Message-Id: <497FB59F-3A4A-45CA-B5AA-946590ED2D7F@robburns.com>
To: HTML WG <public-html@w3.org>

table, presentational attributes, 2-D 2d 2 dimensional cells, data,  
header,heading, attribute inheritance, TABLE, CAPTION, COLGROUP, COL,  
part of my review of 3.15 Tabular data

   propose including UA norms that resurrect HTML 4.01 and RFC 1942  
THEAD, TFOOT and TBODY default presentation proposal for interactive UAs
   propose specifying 2D interaction of attributes (like HTML 4.01)
   propose specifying how table columns should behave with events,  
focus and @draggable
   propose addressing table presentation / styling attributes


There are many problems surrounding tables that HTML5 should address,  
but does not do so with the current draft. One problem is a failure  
to implement the proposals in HTML 4.01 [2] and RFC 1942[1]  to  
provide a fixed THEAD and TFOOT and a scrolling TBODY or TRs portion  
of a table as a display mechanism . Such a display mechanism would  
help authors understand what the semantic role these elements play.  
Without such a default presentation, the only way to understand the  
semantic role for these elements is to print out the web page (and  
who want to do that. ;-) ). The second problem involves the 2- 
dimensional inheritance and application of HTML content/markup  
attributes.. A third problem involves the presentational properties  
and attributes of tables. In particular, there may be reasons to keep  
these attributes in HTML.  We should conduct some research to  
understand why these problems have plagued tables, and what we can do  
to solve these problems in the final HTML5 recommendation.

Fixed table headers and footers in interactive UAs

HTML 4.01 recommended table headers and footers be treated as fixed  
and always visible in the viewport. Typically this has been  
implemented for printed tables, but not for on screen tables. The  
HTML5 draft should reiterate these UA norms and perhaps strengthen  
them to must criteria. Perhaps the WG should liaison with the CSS WG  
to provide CSS control over this capability. From the HTML 4.01  
recommendation [2]:

"Table rows may be grouped into a table head, table foot, and one or  
more table body sections, using the THEAD, TFOOT and TBODY elements,  
respectively. This division enables user agents to support scrolling  
of table bodies independently of the table head and foot. When long  
tables are printed, the table head and foot information may be  
repeated on each page that contains table data."

Unfortunately, this language is in a non-normative style. This should  
be strengthened to UAs "should" or "must" fix table headers and  
footers and allow scrolling of the table bodies. Again, CSS could be  
enhanced to provide more precise control over this features.

It is worth noting that neither the XHTML 1 [5] nor the XHTML 1.1 [6]  
recommendations took any steps to deprecate this HTML 4.01 2D  
attribute inheritance

Two-dimensional (2D) attribute inheritance

HTML 4.01 also included a 2-dimensional inheritance model for table  
attributes [2].  Here too, the recommendation does not include  
normative language in this subsection. We should strengthen this to  
normative language and consider how HTML5 attributes should be  
inherited 2-dimensionally in tables. HTML 4.01 included inheritance  
for @valing, @align, @char, @charoff, @lang, @dir and @style.  
Different attributes have different inheritance precedence with  
respect to column and row. However, they all inherit from either one  
when the primary parent does not have a specified value.

HTML5 attributes for 2-dimensional inheritance

The HTML5 draft currently does not discuss the issue of 2D attribute  
inheritance. There are many new global attributes in HTML5 that could  
relate to tables along with a more fully specified event model. We  
should consider how these could fit into a 2D table attribute  
inheritance model. Other attributes might not inherit, but the HTML5  
recommendation should discuss how their values influence the behavior  
given the unique role of table columns.

Presentational table attributes

Global attributes for inheritance:
@irrelevant (make all cells in the column irrelevant),
@title (should bring title treatment to all cells in the column and  
their vertical interstices),
@contentEditable (should make all cells contentEditable),
@dir (should assign the run of text in the cells in the column to the  
value ),
@xml:lang / @lang (assign lang to all cells in the  column),

Other non-inheritable attributes for column specified behavior:
@tabindex (create a tab index to give the column focus, e.g., the  
first cell in the column or the most recently edited cell, etc)
@draggable (make the column draggable),

Also, we should include discussion in HTML5 of the event handler  
attributes and events in general with regard to table columns.

Table styling attributes and properties

HTML 4.01 expresses some hope that CSS would lift some of the burden  
of presentation from HTML regarding tables[7]. Generally, CSS  
provided mechanisms to pick up on all of the presentation attributes  
deprecated in HTML 4.01 tables. However, it is worth mentioning that  
tables are an inherently visual construct, though not as much so as  
images of video. So like images, it may make sense for tables to  
retain some presentational attributes even within the semantic  
document (in particular I think the width, height and alignment  
attributes could be considered integral to the semantics of the  
table; not so much the bgcolor, rules, borders, and many of the other  
table presentational attributes already deprecated). I note that  
neither HTML 4.01, XHTML 1 nor XHTML 1.1 deprecate the remaining  
presentational attributes for tables. HTML5 pulls them from HTML  
without warning (while leaving other presentational facilities such  
as I, B,and FONT).

Neither CSS 2 [3] nor the CSS 2.1 [4] draft yet replace all of the  
presentation facilities previously specified in HTML. In particular,  
though horizontal cell alignment was addressed in CSS 2, CSS 2.1  
quickly deprecated it (in draft form) and most implementations  
quickly started citing CSS 2.1: skipping implementation of the  
alignment feature in the confusion. There are several gaps that remain:

For example, column selectors only allow the styling of a limited  
number of properties: width, border, background, visibility [10].

Also, horizontal alignment, though included in CSS2, has been removed  
from the CSS 2.1 draft which led to confusion among implementations

Similarly, CSS 2 decided to focus on the underlying tree model of  
HTML even for tables and avoided trying to propose a 2D inheritance  
or 2D selector descendence for table cell frames. It says:

Finally, in trying to implement a generalized table presentation  
model in CSS, the CSS 2 recommendation drew made table components  
part of the 'display' property to arbitrarily treat any elements as a  
table (probably to meet the needs for layout tables more so than to  
support data tables). This essentially creates the need for a two- 
pass styling of a document: first to determine what boxes will play a  
role in the table model; and 2) a pass to actually style those table  
boxes according to the rest of the cascade (see the elaboration on  
this at the WebKit bug reporter [8] [9]).


[1]:: Though it has been superseded by RFC 2854, RFC 1942 has a great  
approach to interactive UA table rendering that got lost in the  
updated RFC. See:
[2]:  <http://www.w3.org/TR/html4/struct/tables.html#h-11.2.3>
[3]: <http://www.w3.org/TR/1998/REC-CSS2-19980512/tables.html#q4>
[4]: <http://www.w3.org/TR/CSS21/tables.html>
[5]: XHTML 1.0  <http://www.w3.org/TR/xhtml1/Cover.html#toc>
[6]  XHTML 1.1 <http://www.w3.org/TR/xhtml11/Overview.html#toc>
[7]: HTML 4.01 Chapter 11: Tables <http://www.w3.org/TR/html4/struct/ 
[8]: <http://bugs.webkit.org/show_bug.cgi?id=3241>
[9]: <http://bugs.webkit.org/attachment.cgi?id=13461&action=view>
[10]: <http://www.w3.org/TR/1998/REC-CSS2-19980512/tables.html#q4>
Received on Friday, 10 August 2007 03:00:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:03 GMT