- From: Jukka K. Korpela <jkorpela@cs.tut.fi>
- Date: Sat, 26 May 2012 19:03:09 +0300
- To: Basil Peace <grv87@yandex.ru>
- CC: www-validator@w3.org
2012-05-25 23:34, Basil Peace wrote: > Validating http://matcalc.ru/ > Error [127]: "required attribute X not specified" > > In this case, alt attribute for img isn’t specified, but message offers: > > Typical values for type are type="text/css" for <style> and > type="text/javascript" for <script>. > > If it is common message for any missing attribute, it is good to remove > it at all, since it only confuses. It is presented as an example, but I agree with your comment. The error message is better without that part. The message appears as a separate paragraph, giving it more weight. Moreover, in practice, the type attribute is not needed for <script> and <style> element (it has been made even formally optional in HTML5, and although this does affect validation of XHTML 1.0 documents, it's not useful to emphasize these attributes). > Also, I want to note that text/javascript is obsolete for already a > couple of years, since RFC4329. If validator offers value for type > attribute, it should offer application/javascript. In reality, text/javascript works more reliably than any alternative. But the type attribute is really best omitted in practice, even though some formal rules require it. (It never causes any good, and it is known to cause harm when misspelled, which occurs fairly often.) Yucca
Received on Saturday, 26 May 2012 16:03:40 UTC