According to Success Criterion 1.3.1 (Info and Relationships), most input fields should be explicitly associated with a label. This is done by using the "for" attribute of the label element, which is set to the ID of the relevant input.
Certain fields - namely buttons and hidden fields - should not have a label. In the case of buttons - including submit, reset and plain (so-called "script") buttons - the label is what is displayed on the button itself. For image submit buttons, the label is the button's alt attribute. Finally, it makes no sense for a hidden input to have a label.
This example tests a plain button using the button element..