It is entirely acceptable to use <label>
elements as captions for non-input tags.
The HTML Living Standard
Per the label
element section of the HTML Living Standard, label
elements may optionally be associated with a form control, but this is not required.
The label
element represents a caption in a user interface. The caption can be associated with a specific form control, known as the label
element's labeled control, either using the for
attribute, or by putting the form control inside the label
element itself.
Except where otherwise specified by the following rules, a label
element has no labeled control.
Note, specifically, that in addition to stating that the caption "can be associated with a ... form control" (rather than "must be"), the docs also explicitly state that:
Except where otherwise specified by the following rules, a label
element has no [specific form control associated with the caption].
Which only seems to make sense if the element is intended to be used with or without an associated input. This makes sense in light of label
's semantic meaning as a caption for content– more than just inputs can have and benefit from captions.
The WCAG H44 Objection
Sources which indicate that label
elements should only be used on input
s frequently reference WCAG 2+'s requirement that inputs have labels, along with WCAG Technique H44: Using label elements to associate text labels with form controls, which presents an example pattern that meets the spec.
This is not a mandate for the usage of label
elements, and interpreting it as such is a misreading.
WCAG itself notes that techniques are non-normative on their About Techniques page:
Techniques are not required
Techniques are informative—that means they are not required. The basis for determining conformance to WCAG 2.1 is the success criteria from the WCAG 2.1 standard—not the techniques.
The aim of the H44 Technique is to fulfill or help fulfill four WCAG 2+ success criteria relating to:
Ultimately, the above technique and criteria is designed to aid accessibility– not to dictate that label
elements only be used for user inputs alone.