[Bug 11812] The align attribute on the td and th elements should be conforming

http://www.w3.org/Bugs/Public/show_bug.cgi?id=11812

Ian 'Hixie' Hickson <ian@hixie.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #14 from Ian 'Hixie' Hickson <ian@hixie.ch> 2011-08-17 05:26:40 UTC ---
(In reply to comment #8)
> >
> > Do you have any examples of tables you've written recently? It would be helpful
> > to see what is different about the tables you're writing that make this more
> > attractive to you.
> 
> http://hsivonen.iki.fi/html5-lecture/2011/slides.html#75

tr { text-align: center; }
tr > :first-child { text-align: left; }
tr > :last-child { text-align: right; }

Note that there is nothing semantic about the alignment in this table. It's
just presentational. The table could easily be styled differently without any
loss of usability, just for stylistic reasons.


> http://hsivonen.iki.fi/test/moz/meta-caching.html

Given the default TD and TH styles, the entirety of the alignment of these
tables can be described with a single line of CSS:

   tr > :first-child { text-align: right; }

Again, the alignment here is purely stylistic. In fact I would prefer a style
that makes the first column left-aligned but the data cells centered.

You could also style this by using <thead> and <tbody> instead of just <tbody>;
then the rule would just be:

   tbody th { text-align: right; }


> http://hsivonen.iki.fi/about-blank/ (simply overrides the default th alignment
> due to authoring tool making this way more convenient)

Again, no semantic need for any particular styling here, and everything can
just be done using:

   td, th { text-align: left; }


In all three cases, consider what it would take to change the style with the
current markup (with presentational attributes on every non-default cell) and
what it would take if you had instead just used the trivial CSS presented
above.

IMHO this shows quite convincingly exactly what I suspected: that CSS is the
better solution here.

This is _especially_ true, IMHO, because there is, it seems, no difference
between some of the other styles used (backgrounds, borders, border radii,
fonts, colors, padding) and alignment. They can all be trivially described in
terms of CSS. In fact, in one case (the slides example above) you even have a
style rule that is triggered based on the align attribute!


EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the tracker issue; or you may create a tracker issue
yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: Using CSS for this has all the advantages that using CSS has in
other cases — easier maintenance, smaller file sizes, easier to restyle, more
control — and has no additional disadvantages. It doesn't even require new
skills, since CSS is already used for styling these tables and since the
additional rules are trivial in complexity.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Wednesday, 17 August 2011 05:26:48 UTC