couple of comments on the Markup Validation Service

A piece of html that I wrote provoked the validation service to flag a
plythera of errors of 3 types.  I imagine there are better ways accomplish
what my code does which *do* conform to the spec, but it might be useful to
take another look at the tool and the spec regarding whether these should
actually be errors.  None of the flagged "errors" seem to prevent desired
code execution.

First error type involved using "size attribute for input types file and
number:  [image: Error] *Line 20 <http://validator.w3.org/check#line-20>,
Column 84*: Attribute size not allowed on element input at this point.

actual code:  <input type="file" id="approvalInputTypeFile" multiple
accept="image/*" size="80"> <!--validate doesn't like using size if
type is file, but how else control the field size -->

likewise for  <input type="number" id="numImageId" size="3" value="6"
min="1"> <!--validate doesn't like using size if type is number, but how
else control the field size -->

In each case, the "size" determined the size of an input field which
respectively accepted a path_and_file_name, and a number.



The other two errors were objections to <img>s with no src or alt.  My HTML
supplied placeholder <img> locations.  The JS supplied the actual src and
alt for each location that was utilized at any particular point in time.
 The html, including my comment about the validation tool looks like this:
The errors: [image: Error] *Line 93
<http://validator.w3.org/check#line-93>, Column 28*: Element img is missing
required attribute src.
and:        [image: Error] *Line 93
<http://validator.w3.org/check#line-93>, Column 28*: An img element must
have an alt attribute, except under certain conditions. For details,
consult guidance on providing text alternatives for images.
  <div id="doubleScreen"
style="background-color:#FFD700;width:3700px;display:inline-block;">
    <div id="leftScreen"
style="width:1825px;text-align:right;float:left;background-color:#FFA500;">
    <img id="idImageFile1"> <!--validation tool wants a src and an alt.
 Has no way of knowing it will be provided by the js. -->
    <img id="idImageFile3">
    <img id="idImageFile5">


Ed Vassar



-- 
edv

Received on Friday, 25 July 2014 11:35:12 UTC