W3C home > Mailing lists > Public > www-validator@w3.org > January 2016

Relax validation for the template tag

From: Dane Foster <studdugie@gmail.com>
Date: Tue, 19 Jan 2016 12:39:22 -0500
Message-ID: <CA+WxinLZhzXmf-kXUqCiBuMVDaLS_ZDdyAxMMnBocvtCa6cYog@mail.gmail.com>
To: www-validator@w3.org
Hello,

To who it may concern I would like to suggest a modification to the HTML5
validator.

HTML5 introduced the <template> tag which I make extensive use of as a web
app developer. Unfortunately, the validator has no special handling for
<template> and therefore complains about violations perpetrated by its
children. For example, a template may have an <img> descendant w/ an empty
src attribute. But the src attribute will be set when the template is
instantiated by JavaScript. So though technically speaking it's correct to
say that the <img> violates the spec, from a functional perspective it
doesn't because when instantiated and made live in the DOM it has the src
attribute set.

So the problem I would like to see addressed is this. The fact that the
validator has no special handling for <template> means that validation for
me is tedious and error prone because of the additional cognitive load
expended to separate the signal (i.e., the legitimate issues w/ a page)
from the noise (i.e., all the errors and warnings from <template> content).

My recommended solution is that the validator only checks <template>
content for well-formedness violations and nothing else.

Thank you for your consideration,

Dane
Received on Wednesday, 20 January 2016 09:53:38 UTC

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