W3C home > Mailing lists > Public > public-html@w3.org > June 2009

RE: HTML 5 suggestion for TABLE element

From: Dahal, Biswa <biswa-dahal@uiowa.edu>
Date: Thu, 11 Jun 2009 10:13:08 -0500
To: "'public-html@w3.org'" <public-html@w3.org>, "public-html-comments@w3.org" <public-html-comments@w3.org>
CC: 'Lachlan Hunt' <lachlan.hunt@lachy.id.au>, 'Giovanni Campagna' <scampa.giovanni@gmail.com>
Message-ID: <D24E39EF5D07D946B1BC32B96DA236DE4113D728E3@IOWAEVS09.iowa.uiowa.edu>
My recommendation is to have the following attribute for tags: <thead> and <tfoot>
Attribute: scroll = scrolling (default) | fixed
Reason: Wide use cases + I think CSS is not fully sufficient (details below)
Although it seems like a presentation issue for the most part, I think having it in the HTML 5 spec will make sense because:


There are examples on the web where you can see that the fixed headers (non-scrolling headers) for tables are achieved using CSS. 
The way this is done is by having one DIV element for fixed header/footer and another DIV element below it to contain TABLE element within it.
This table element will have its column widths fixed according to some percentage values so that it aligns with the widths in the "fixed" header DIV.

I think this CSS based approach makes the tables less accessible because in the nested table you would have to either not have <thead> elements or hide them (because you don't want to see two headers for the table). 

Second, I think the layout of the table is now less flexible because the table is less fluid (you have to align the header DIV with table column widths manually - change in one requires a change in the other + you have to consider the width taken by scollbars in the overflowing DIV that contains the table)

Although for the most part I think it appears to be a CSS issue, at least for the two cases above I think it will be useful to have it part of the TABLE - THEAD/TFOOT tags in HTML 5 spec.

Having it built as part of the TABLE allows the same fixed THEAD/TFOOT elements to be read by screen readers for accessibility and removes the burden from developers to address minute differences. 


Having a new style attribute, say "table-header: fixed", "table-footer:fixed", I think ties style information to an "HTML ELEMENT", (because those styles can only be applied to THEADs and TFOOTs). Since CSS is presentational only and should be applicable to any element (not just HTML elements), I don't think it should be a part of CSS.

Looking forward to feedback.

Thanks,
BD






-----Original Message-----
Dahal, Biswa wrote:
> My recommendation is to add an attribute "scroll: scolling (default)
> | fixed" in<thead>  and<tfoot>  to allow them to be fixed (non
> scrolling headers / footers ). This is currently performed through
> CSS hacks and is not consistent across browser implementations.
> Example CSS implementation:
> http://www.ssi-developer.net/css/non-scrolling-table-hdr.shtml to
> understand the effect. Alternatively, you can open Excel and use
> "freeze panes" to view the effect.

Lachlan Hunt wrote:
.
.
.
In my opinion, using CSS to achieve this presentational effect is the 
correct solution, and since there is an existing solution, it's not 
clear what problem you're trying to solve.  I do not think introducing a 
scroll attribute in HTML for this purpose would be a good idea.

But, you're free to send the idea to the HTMLWG for consideration if you 
like.
.
.
.


-----Original Message-----
From: Giovanni Campagna
.
.
.
This does not belong to HTML, it belongs to CSS Tables Level 3, in
defining the meaning of height and overflow for table-row-groups
(currently undefined). You should forward this suggestion to
www-style@w3.org
.
.
.
Received on Thursday, 11 June 2009 15:13:50 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:04 UTC