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

Re: HTML 5 suggestion for TABLE element

From: Eduard Pascual <herenvardo@gmail.com>
Date: Thu, 11 Jun 2009 17:40:42 +0200
Message-ID: <6ea53250906110840k50b03fe0v5ef6c10a8025fa0@mail.gmail.com>
To: "Dahal, Biswa" <biswa-dahal@uiowa.edu>
Cc: "public-html@w3.org" <public-html@w3.org>, "public-html-comments@w3.org" <public-html-comments@w3.org>, Lachlan Hunt <lachlan.hunt@lachy.id.au>, Giovanni Campagna <scampa.giovanni@gmail.com>
On Thu, Jun 11, 2009 at 5:13 PM, Dahal, Biswa<biswa-dahal@uiowa.edu> wrote:
> My recommendation is to have the following attribute for tags: <thead> and <tfoot>
> Attribute: scroll = scrolling (default) | fixed
This belongs to CSS. I'm not saying that CSS currently solves it (at
least, not in a desirable way), but it should be solved by CSS rather
than by HTML. Giovanni already pointed you to the CSS3 mailing list,
which is similar to this one but people there work on the next version
(or "layer", if some purist is reading this) of CSS (just like people
here work on the next version of HTML).

> Reason: Wide use cases + I think CSS is not fully sufficient (details below)
Should be solved by CSS + CSS doesn't solve it yet = Should get into
the next CSS version. That's why Giovanni pointed you to the place
where the next CSS is brewing; and I just noticed that he already
forwarded there your issue.

> Although it seems like a presentation issue for the most part, I think having it in the HTML 5 spec will make sense because:
It is a presentation issue. It is true that current workarounds raise
accessibility issues, but efforts will bear more fruit by addressing
the root issue rather than the workarounds' issues.

>
> 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.
See above: ideally, the root issue should be addressed, rather than
just improving the workarounds.

> 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.

This is a missconception. CSS's "display: table" & co. isn't bound at
all to HTML's <table> element & co.: <table> in HTML means something
like "this is tabular content", while "display: table" in CSS means
just that: "this should be displayed as a table of rows and columns".
Of course, the default way to display tabular content is as a table of
rows and columns, but you can display it as nested lists if you want;
and you may represent something that isn't tabular as a table (and,
AFAIK, CSS3 is capable of both things on its current state, even if
unfinished). For a more specific example: you can use "display: table"
and its friends to get part of a generic XML file rendered as a table.
And, if someone does this, shouldn't the "scroll: fixed" idea be
available for those tables as well? Definitely, your idea should go
into CSS, so XML can benefit of it as well.

Regards,
Eduard Pascual

>
> 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:41:40 GMT

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