The standard HTML 5 form label wants an ID to link the label to the input.
<form>
<label for="male">Male</label>
<input type="radio" id="male"/>
<label for="female">Female</label>
<input type="radio" id="female"/>
</form>
As most JS developers know, using IDs leaks globals - in this case, window.male
and window.female
are created.
How can I use form labels without creating globals?