WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Use of label without input

for

From: Carly Gerard
Date: Nov 15, 2019 11:28AM


Hi Brian,

From the MDN Dev documentation on the label element<https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label>: "The HTML <label> element represents a caption for an item in a user interface" (emphasis my own).

I interpret that to mean any text that is associated with some kind of user interface control--an input, a select, a textarea, etc. If there's a corresponding control where the user can do something, then label is more appropriate. If it's plain text with no corresponding control, a paragraph should suffice.

Hopefully that helps,

Carly

[Western logo]

Carly Gerard | She/Her/Hers
Web Accessibility Engineer | Web Communication Technologies
Western Washington University
516 High Street, Bellingham WA 98225
<EMAIL REMOVED> <mailto: <EMAIL REMOVED> > | <EMAIL REMOVED> <mailto: <EMAIL REMOVED> > | (360) 650-3944<tel:(360)%20650-3944>

From: WebAIM-Forum < <EMAIL REMOVED> > on behalf of Brian Lovely via WebAIM-Forum < <EMAIL REMOVED> >
Sent: Friday, November 15, 2019 10:19 AM
To: WebAIM Discussion List < <EMAIL REMOVED> >
Cc: Brian Lovely < <EMAIL REMOVED> >
Subject: [WebAIM] Use of label without input

Is there any reason not to use a label as a simple container for text,
without any related input? The best reason I can come up with is "pride in
your work", but that's likely not enough. Minus being associated with an
input via the for attribute, a label element seems to be a non-semantic
container like a div, span, or <p>.

It bugs me that people do this, but I can't find any citable reason to tell
them to stop.

--
*Brian Lovely*
Capital One Digital Accessibility
804.389.1064




The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates and may only be used solely in performance of work or services for Capital One. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.