[Bug 16504] New: Improve white-space note. E.g. add that not just JS but CSS too is affected

https://www.w3.org/Bugs/Public/show_bug.cgi?id=16504

           Summary: Improve white-space note. E.g. add that not just JS
                    but CSS too is affected
           Product: HTML WG
           Version: unspecified
          Platform: PC
               URL: http://dev.w3.org/html5/html-xhtml-author-guide/#attri
                    butes
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML/XHTML Compatibility Authoring Guide (ed: Eliot
                    Graff)
        AssignedTo: eliotgra@microsoft.com
        ReportedBy: xn--mlform-iua@xn--mlform-iua.no
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org, eliotgra@microsoft.com


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

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Saturday, 24 March 2012 04:16:43 UTC