As described on the example, when a label element without a for property is replaced by one that has the for property on the DOM tree, when re-adding the first element it will be rendered with a for property with value of "empty string".
After talking with @zwilias, this seems to be related with #142 and a workaround seems to be:
Link to SSCCE: https://ellie-app.com/kGcc5FVT7a1/4
As described on the example, when a
label
element without afor
property is replaced by one that has thefor
property on the DOM tree, when re-adding the first element it will be rendered with afor
property with value of "empty string".After talking with @zwilias, this seems to be related with #142 and a workaround seems to be:
A working example with this workaround can be found on https://ellie-app.com/mckMkM7SZa1/1
Also, the relevant spec: https://html.spec.whatwg.org/multipage/forms.html#the-label-element