2009/10/28 Niel Archer <niel.arc...@blueyonder.co.uk>: >> 2009/10/28 Hannes Magnusson <hannes.magnus...@gmail.com>: >> > On Tue, Oct 27, 2009 at 00:41, Niel <spam-f...@blueyonder.co.uk> wrote: >> >>> Shouldnt it fall back on getimagesize() if these options arent provided? >> >>> >> >>> This mail was sent from my HTC MAGIC. Sorry for any and all typos that >> >>> may >> >>> have been in this mail. >> >>> >> >>> On Oct 26, 2009 10:38 a.m., "Richard Quadling" <rquadl...@php.net> wrote: [SNIP] >> >> >> >> The alt attribute is required, so should not be omitted for the xhtml; >> >> even if the DocBook source does not supply a value. Default value if >> >> not supplied should be the filename, unless someone has a better idea? >> > >> > Good point, the media object should always produce a alt attribute for >> > <img>s. >> > >> > >> > >> >> Although not required, adding the width and height values if not >> >> supplied seems a good idea. >> > >> > I consider it to be "best practice" to provide these values... >> > >> > -Hannes >> > >> >> OK, so PhD would need to work out the aspect ratio and handle the >> conversion to a fixed size rather than allowing the user agent. handle >> the sizing natively when only the width _or_ depth are supplied. > >> I've no problem with that, but it is redundant. HTML doesn't require >> them. That's it. Best practise would be to follow the spec surely? >> >> [1] shows that height and width are implied and [2] specifically says >> "When specified, the width and height attributes tell user agents to >> override the natural image or object size in favor of these values.", >> but that can certainly be countered by [2] "The height and width >> attributes give user agents an idea of the size of an image or object >> so that they may reserve space for it and continue rendering the >> document while waiting for the image data." >> >> Ho hum. I always knew that the spec was vague but those 2 statements >> really do muddy things - are they required or not (no but it sure >> helps seems to be the answer). >> >> So do we do more work in PhD or just let the user agent do its job? >> >> If I had free rein, I'd make all images fit to a thumbnail size and >> add lightbox or something similar. We are already using jQuery for >> some user enhancements, so ... >> >> Richard. > >> [1] >> http://www.w3.org/TR/1999/REC-html401-19991224/struct/objects.html#edef-IMG >> [2] http://www.w3.org/TR/1999/REC-html401-19991224/struct/objects.html#visual >> >> shows that the height and width are implied. > > I would suggest adding the values only if the DocBook markup does not > supply both of the values. In this case it will help the UA by supplying > values to reserve space.. > > If the author has supplied one (but not both) of the values, then they > have either made a conscious choice to omit one, or a mistake. In either > case PhD should respect the supplied data and leave it to the UA to > decide how to handle the missing item. > > Can PhD give warnings? If so, informing the user of missing width/height > values (where one is supplied but not the other), and of missing alt > values would be useful. > >> -- >> ----- >> Richard Quadling >> "Standing on the shoulders of some very clever giants!" >> EE : http://www.experts-exchange.com/M_248814.html >> Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 >> ZOPA : http://uk.zopa.com/member/RQuadling > > >
That sounds like a plan. -- ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling