W3C home > Mailing lists > Public > www-validator@w3.org > July 2014

couple of comments on the Markup Validation Service

From: Edward Vassar <ervassar@gmail.com>
Date: Tue, 22 Jul 2014 20:02:03 -0400
Message-ID: <CACSP7q3DjFTcAk3STdqbAUk7__fykh+KWWsNXTDBbA91NC2caw@mail.gmail.com>
To: www-validator@w3.org
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"
    <div id="leftScreen"
    <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

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

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:11 UTC