{"action":"created","issue":{"url":"https://api.github.com/repos/whatwg/html/issues/541","labels_url":"https://api.github.com/repos/whatwg/html/issues/541/labels{/name}","comments_url":"https://api.github.com/repos/whatwg/html/issues/541/comments","events_url":"https://api.github.com/repos/whatwg/html/issues/541/events","html_url":"https://github.com/whatwg/html/issues/541","id":127686121,"number":541,"title":"Validation consideration for the template tag","user":{"login":"studdugie","id":3189701,"avatar_url":"https://avatars.githubusercontent.com/u/3189701?v=3","gravatar_id":"","url":"https://api.github.com/users/studdugie","html_url":"https://github.com/studdugie","followers_url":"https://api.github.com/users/studdugie/followers","following_url":"https://api.github.com/users/studdugie/following{/other_user}","gists_url":"https://api.github.com/users/studdugie/gists{/gist_id}","starred_url":"https://api.github.com/users/studdugie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/studdugie/subscriptions","organizations_url":"https://api.github.com/users/studdugie/orgs","repos_url":"https://api.github.com/users/studdugie/repos","events_url":"https://api.github.com/users/studdugie/events{/privacy}","received_events_url":"https://api.github.com/users/studdugie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"zcorpan","id":244772,"avatar_url":"https://avatars.githubusercontent.com/u/244772?v=3","gravatar_id":"","url":"https://api.github.com/users/zcorpan","html_url":"https://github.com/zcorpan","followers_url":"https://api.github.com/users/zcorpan/followers","following_url":"https://api.github.com/users/zcorpan/following{/other_user}","gists_url":"https://api.github.com/users/zcorpan/gists{/gist_id}","starred_url":"https://api.github.com/users/zcorpan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zcorpan/subscriptions","organizations_url":"https://api.github.com/users/zcorpan/orgs","repos_url":"https://api.github.com/users/zcorpan/repos","events_url":"https://api.github.com/users/zcorpan/events{/privacy}","received_events_url":"https://api.github.com/users/zcorpan/received_events","type":"User","site_admin":false},"milestone":null,"comments":6,"created_at":"2016-01-20T13:47:59Z","updated_at":"2016-01-21T14:12:10Z","closed_at":null,"body":"Hello,\r\n\r\nI've run into a practical/functional problem w/ how the spec treats HTML5's new `template` tag. The issue started out for me as a problem w/ validation but after raising the issue on the W3C's validator mailing list I've since learned that the validator is simply doing what the spec demands it does. Therefore I'm raising the issue here. But I'm going to explain it in terms of validation because that's how the problem ultimately manifests itself.\r\n\r\nI am a web app developer and my shop makes **extensive** use of HTML5's `template` tag. Here are some actual examples from my work that highlight the problem (assume the root element is a `template`) :\r\n* `img` descendants whose `src` attributes are not set\r\n* `time` descendants whose text content is empty\r\n* Variants of the same form on a page that have a mutually exclusive relationship between themselves. The spec violation here is that some of the elements in the form are the same therefore they have the same IDs.\r\n\r\nTechnically speaking 1-3 violate the spec but functionally speaking they do not because the JavaScript process of turning an inert template into a live node in the DOM includes, in the case of 1 &  2, setting the `src` attribute and giving `time` its text content. In the case of 3, because the forms are mutually exclusive to each other only 1 of them will ever be made live.\r\n\r\nSo the crux of the issue we are having is that validation is tedious and error prone because every time we try to validate a page in our web app we are met w/ a litany of warnings and errors about all the things wrong w/ the descendants of each `template` element on the page, which significantly detracts from our ability to identify any legitimate issues with the page. It's so bad now that we have given up on validation entirely.\r\n\r\nThe only reason I've bothered to raise this issue is because I'm a follower of html5doctor.com on Twitter and recently reread this article, http://html5doctor.com/html5-check-it-before-you-wreck-it-with-miketm-smith/. Mike Smith's attitude struck a note w/ me. He represented the validator and the people behind it as being genuinely interested in helping and improving the lives of web developers. So I said to myself, \"what the heck, the worse that could happen is nothing\". But what I would actually like to see happen is that the spec be modified in such a way that allows a validator to stop complaining about the violations by children of `template` so that developers can focus on what is actually wrong w/ a page.\r\n\r\nThanks,\r\n\r\nDane\r\n\r\n[UPDATE] I thought I should give a more concrete example of the form/id problem.\r\nThere is a `template` w/ a login form w/ user name and password fields and the associated ID attributes on both. There also exists a `template` w/ a create account form, which necessarily has user name and password fields w/ the same IDs as the login form. Only 1 of these forms can ever be live in the DOM so though the IDs are duplicates they never collide in the live DOM."},"comment":{"url":"https://api.github.com/repos/whatwg/html/issues/comments/173580241","html_url":"https://github.com/whatwg/html/issues/541#issuecomment-173580241","issue_url":"https://api.github.com/repos/whatwg/html/issues/541","id":173580241,"user":{"login":"studdugie","id":3189701,"avatar_url":"https://avatars.githubusercontent.com/u/3189701?v=3","gravatar_id":"","url":"https://api.github.com/users/studdugie","html_url":"https://github.com/studdugie","followers_url":"https://api.github.com/users/studdugie/followers","following_url":"https://api.github.com/users/studdugie/following{/other_user}","gists_url":"https://api.github.com/users/studdugie/gists{/gist_id}","starred_url":"https://api.github.com/users/studdugie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/studdugie/subscriptions","organizations_url":"https://api.github.com/users/studdugie/orgs","repos_url":"https://api.github.com/users/studdugie/repos","events_url":"https://api.github.com/users/studdugie/events{/privacy}","received_events_url":"https://api.github.com/users/studdugie/received_events","type":"User","site_admin":false},"created_at":"2016-01-21T14:12:09Z","updated_at":"2016-01-21T14:12:09Z","body":"I agree w/ everything stated and especially w/ the bit about empty elements. That one is a personal pet peeve of mine. When I used to validate I used to scream at the validator for the long list of warnings about empty elements and missing attributes that it spat out. It was during one of those scream-fests that I realized that validation wasn't worth it. So I am really quite delighted that there is a chance something will be done about it."}}