WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Use of label without input

for

From: glen walker
Date: Nov 15, 2019 11:45AM


I find it silly to use a <label> if you're not labeling anything. You
don't get any extra semantic info from using that element by itself.

The official html spec for the label,
https://www.w3.org/TR/html53/sec-forms.html#the-label-element, says it
should be used with a "labelable element". A list of labelable elements is
provide at https://www.w3.org/TR/html53/sec-forms.html#labelable-element
(which is the same url as the <label> spec but further up the page).