- From: Wendy A Chisholm <wendy@w3.org>
- Date: Wed, 17 Nov 1999 12:48:20 -0500
- To: WAI Guidelines List <w3c-wai-gl@w3.org>
Hi all, I took an action item at last week's call to find out how whitespace is being handled in XML, to ensure that the strategy/interpretation of whitespace in alt is consistent with future mechanisms. I also created an HTML test page and discovered some interesting results. XML investigation the XML spec [1] says the following re: the preservation of white space: <BLOCKQUOTE> An XML processor must always pass all characters in a document that are not markup through to the application. A validating XML processor must also inform the application which of these characters constitute white space appearing in element content. A special attribute named xml:space may be attached to an element to signal an intention that in that element, white space should be preserved by applications. </BLOCKQUOTE> HTML test page I have created a test page [2]. the results from MSIE5 and Opera 3.6 (win98) are included in the page. Note the results for . Could people send the results of other browsers and platforms? I'm particularly interested in HomePage Reader, Web Speak, and Netscape and results from Macintosh and Linux platforms. Gregory has already reported that Lynx likes " " but not "" (it will ignore). What does it do for ? I am leaning towards the following proposal, although i would like to see what the results of other tests are before committing to anything. <BLOCKQUOTE> for spacer images, use alt=" ". </BLOCKQUOTE> nice and simple, eh? it seems most inline with the XML spec as well. thoughts? --wendy [1] http://www.w3.org/TR/1998/REC-xml-19980210#sec-white-space [2] http://www.w3.org/WAI/GL/tests/spaces.html At 09:09 AM 11/11/99 , Alan J. Flavell wrote: >On Wed, 10 Nov 1999, Charles McCathieNevile wrote: > > > I agree with you that there is no particular problem in using , > except > > that you don't know how it will be rendered. > >Well, there's a lot that one doesn't know about how HTML will be >rendered, and that is one of its strengths. > >I'd say we have a clear idea of what is meant by 'foo bar', even >if there are limits to what we know about how it will be rendered. >And we know that because is not classified as white space[1], >the rules concerning the suppression of leading and/or trailing white >space do not apply to it. It would seem to me that foo<IMG SRC=.. >ALT=" ">bar, from the point of a text browser, is equivalent to >foo bar, and as such it is distinctively different from the >otherwise similar construct where ALT="". And would, one hopes, be >indexed differently. > >[1] http://www.w3.org/TR/REC-html40/struct/text.html#h-9.1 > > > The specification explicitly > > says leading/trailing whitespace in attributes will be ignored, > >Indeed, but nbsp is not white space. > >(and earlier in the thread) > > > What user agents ignore the space character in ALT=" "? > >I honestly don't know, also I'm not sure whether an isolated white >space counts as leading or trailing or neither. I've used ALT=" " >before, but in view of the uncertainty about this point, I'd be >willing (in appropriate situations) to use no-break space instead, >without a qualm. > >I'm _not_ talking about formatting as such, but about maintaining a >separation between two text tokens separated by nothing but an image >(say for example a logo), that would otherwise in a text-mode browser >get run together and thus misinterpreted as a single word. > >Hope this is useful.
Received on Wednesday, 17 November 1999 12:45:46 UTC