[whatwg] style='' on every element

Michel Fortin michel.fortin at michelf.com
Sat May 5 05:50:52 PDT 2007


Le 2007-05-04 à 21:28, Sander Tekelenburg a écrit :

> I think I would agree with 1 through 3 (Michel Fortin's objects to  
> 3, but the
> rationale he gives seems to only apply to 4. So I don't understand the
> objection to 3. But perhaps I misunderstood.)

The rationale for disliking 3 (conformance checkers warning about  
style="") was indeed not very clear in my previous email. So let me  
explain my thoughts a little more.

I think style="" can be useful in a couple of cases. Not all style  
rules are reused: sometime they're used only once in the middle of a  
document in which case it has no real benefit and it just complicate  
things for the author to put the style in a separate stylesheet and  
work out a way to apply the style to the right element (class, id).

Therefore, warning on all style attributes found in a document is a  
little too broad in my opinion: it's counterproductive for authors  
checking their documents, and it may just encourage people to blindly  
copy all their style rules to a stylesheet without giving in more  
thought. It may be a better idea for the conformance checker to parse  
style rules listed in the style attribute and warn only against those  
having a high risk of being problematic for accessibility.

This later approach could have the benefit of being compatible with  
WYSIWYG-edited documents. In the eventuality a WYSIWYG editor was to  
output a style rule that compromise accessibility, I think it deserve  
to be flagged anyway.

For instance: <span style="font-style:italic"> could be flagged, and  
<i> proposed as a replacement. WYSIWYG editors that italicise with a  
style rule are most probably in the wrong anyway since whatever is  
meant by italics, it's likely to be relevant to the understanding of  
the document. <p style="text-align:justify"> should not trigger any  
warning because that's the best way for a WYSIWYG editor to change  
the appearance of a paragraph. It's a dubious style rule for when the  
author is in control of the stylesheet, but it's not harmful. In  
other words, warn only about specific things for which you have  
something better to propose.

Of course, nothing of this belongs in the spec. A conformance checker  
is free to warn about anything it wants. But systematically warning  
about style="" is not something I would find useful.


Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/





More information about the whatwg mailing list