Bug report: Two fundamental bugs in Forms Designer
As I was exercising the forms designer, ran across two fundamental bugs in its output, one of which is bad enough, but the other results in invalid HTML markup being emitted, which means there's no guarantee it will actually work in any particular current or future browser. Right now it works simply because of Postel's Law. Spec changes could break it, and there's no guarantee future User Agent developers will support it, because it's never been supported in a spec. (Even the HTML4 spec prohibited it; the fact it works the way it does is merely an accident based on ease of implementation.)
Invalid HTML bug:
The forms designer locates the form inside a span element, and also inside a noscript element. Both locations are forbidden to a form according to the HTML 5 specification. The form element is type 'Flow Content', the span element is to contain only 'Phrasing Content' (and it's also invalid inside the noscript element, since the noscript element is located within a span, and the content type of noscript is 'Transparent,' meaning it takes on the content type of its parent).
Annoying Bug:
The other bug is that it refuses to allow a submit button to be placed inside a fieldset, something which is both explicitly allowed by the HTML 5 spec (a submit button is merely a subclass of an input field or a button element, depending upon markup, and both are allowed within a fieldset) and extremely useful for setting a form apart from normal page content, both visually and for assistive technology, due to the legend element. This second bug can be compensated for visually with some creative CSS, but it loses its association with the form and the fields within it. Might be able to workaround it for assistive technologies with ARIA roles, but hey, that's right, you're also not allowed to assign ARIA roles to form elements in the forms designer, are you?
A potential defect I have observed but haven't tested yet: It forces the same form to always have the same ID, apparently. If true, that will also result in both invalid HTML and undefined behavior should you have a single page with a tabbed interface including the same form within two or more tabs. (Particular use case of ours that brought this possibility to my attention is the case of having two sales locations, both served by the same contact form but appearing on different tabs in a contact page that also includes other, non-sales-and-marketing departments with different forms. I've no idea what will happen, but I know if I simply copy the insertion javascript I'll have the duplicate ID issue rise up. I haven't tried to create a workaround yet -- that's why I only claimed two bugs in the subject; count this as a suspected but unverified third one. I may be back with this one as a verified bug if I can't get past it.)