In HTML5, void elements cannot have an end tag. http://www.w3.org/TR/html5/syntax.html#void-elements
This means that if you use an HTML5 doctype and the Tag Decorator to generate your input tags, you will have invalid markup.
You can still get valid markup by calling tag_start() rather than tag() but that seems like a hack and perhaps requiring the user to know too much about the underlying markup. Might a feature like this work a bit better?:
Hmmm, no particularly elegant solution. I'll mess with this after I finish extricating (working on it today).
Not my area of expertise, but would it be possible to detect HTML5 support and generate tags accordingly?
The good news there is that there's generally no problem serving HTML5 to pre-HTML5 browsers, as long as the browser is not in quirks mode. And a valid HTML5 doc type will not put browsers into quirks mode. So determining HTML5 safety (as opposed to support) is straightforward.
We have a few options here:
It might be worth figuring out if we want to move to that first option for 1.3. Forward-looking and all that.
In the meantime, we have the when-to-close-and-when-not-to-close-a-tag issue. I'm unaware of any real-world problems this causes. The only issue I've noticed is that it generates pages that then fail to validate. So the pages are technically incorrect. But the pages still work in the browsers I've tested.