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 6960 - IMAGES_SPECIFY_SIZE: propose correct code
Summary: IMAGES_SPECIFY_SIZE: propose correct code
Status: RESOLVED FIXED
Alias: None
Product: mobileOK Basic checker
Classification: Unclassified
Component: Web interface (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 enhancement
Target Milestone: ---
Assignee: fd
QA Contact: fd
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-27 09:59 UTC by fd
Modified: 2010-04-19 10:15 UTC (History)
0 users

See Also:


Attachments

Description fd 2009-05-27 09:59:58 UTC
The failures keep telling that the height/width attributes are missing or incorrect, but having the correct size displayed next to the incriminated code line would greatly help fixing the error!

Instead of:
 <img src="foo" alt="" />
... say:
 <img src="foo" alt="" /> should be <img src="foo" width="50" height="40" alt="" />

Alternatively, if tweaking the code turns out to be more difficult than it seems, simply provide the part to add or replace: "width='50' height='40'" or the size of the image: "50*40"
Comment 1 fd 2010-04-19 10:15:23 UTC
The fix is computed when the report coming from the mobileOK Checker is completed (in completeResults.xsl).

The Checker now proposes the fix, either with the appropriate img tag or with a template tag when the dimensions of the image are not known, e.g. if the image could not be retrieved, or if its format is unknown (incidently, the dimensions of PNG images is unknown, sic!)