This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 16504 - Improve white-space note. E.g. add that not just JS but CSS too is affected
Summary: Improve white-space note. E.g. add that not just JS but CSS too is affected
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML/XHTML Compatibility Authoring Guide (ed: Eliot Graff) (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Eliot Graff
QA Contact: HTML WG Bugzilla archive list
URL: http://dev.w3.org/html5/html-xhtml-au...
Whiteboard:
Keywords: a11y
Depends on:
Blocks:
 
Reported: 2012-03-24 04:03 UTC by Leif Halvard Silli
Modified: 2013-04-09 00:49 UTC (History)
5 users (show)

See Also:


Attachments

Description Leif Halvard Silli 2012-03-24 04:03:27 UTC
Firstly:  

The Note at the end of  the Attributes section currently says:

]] Practically speaking, for source code with newlines within attributes, DOMs generated via XML and HTML will be different; however, whitespace differences have no behavioral impact on the page unless explicitly examined by JavaScript, rendering the differences of small consequence. [[

However,  Web authors actually try to style the rendering of alternative text of the <img> element. 
http://jandcgroup.com/2010/07/14/line-breaks-in-alt-attribute-using-css-white-space-property/
And, so, if authors try to - like in the link above - to use 

   img{white-space:pre}

in order that the line breaks of the @alt text is preserved, they will get a surprise: Unless they remembered to use NCR, there will not be any line breaks, meaning that it will look too the author as if white-space:pre did not work. [I just had this supprise myself.]

Therefore, please mention that attributes whose content is rendered visually, such as the content of @alt, is also affected.

Secondly: 

It is a bit confusing that the note says that "polyglot markup does not use newline characters within an attribute", because in the example just above the note, there are newline  characters - in the form of NCRs. Please change the text of the note by adding the wording 'directly typed': "does not use DIRECTLY TYPED newline character". And also, in the last sentence of the note, you should say 'directly typed newline' and not just 'newline'.

Thirdly: Also, what do you mean by 'linefeed characters' in plural? There is only one linefeed character.

Fourthly: please be consistent with regard to 'linefeed' vs 'line feed' - you use both, now.

Fift: I don't know from what the draft says about @title - HTMl5 only recommends one to be cautious with newline inside @title: http://dev.w3.org/html5/spec/global-attributes.html#the-title-attribute

 {Sorry, this became much longer than I had planned ...}
Comment 1 Eliot Graff 2013-04-09 00:49:04 UTC
-Removed ban on newline in @title
-Added mention of attributes that render visually being afffected by white space.
-Added disambiguator about "directly typed" newline characters.

-Couldn't repro "line feed" v. "linefeed"
-Couldn't repro "linefeed characters"


new revision: 1.95; previous revision: 1.94