E-mail List Archives
Re: Question about search form label
From: glen walker
Date: Sep 13, 2023 6:37PM
- Next message: Steve Green: "Re: WCAG SC 1.4.10 (Reflow) and intentionally hidden content"
- Previous message: glen walker: "Re: WCAG SC 1.4.10 (Reflow) and intentionally hidden content"
- Next message in Thread: None
- Previous message in Thread: Aaron Krug: "Question about search form label"
- View all messages in this Thread
Sounds like a 3.3.2 issue. A placeholder is not a label because, as you
said, it disappears when you type. And providing an aria-label, while
providing an accessible name, is only available to some assistive
technology users.
The label for the search field doesn't have to be a text label. It can be a
magnifying glass, as long as the icon has alt text. The definition of
"label" in 3.3.2 is part of the normative definition,
https://www.w3.org/TR/WCAG21/#dfn-labels, and says, "text or *other
component *with a text alternative that is presented to a user to identify
a component within Web content". The "other component" can be an icon.
I like the "floating label" concept,
https://bradfrost.com/blog/post/float-label-pattern/
- Next message: Steve Green: "Re: WCAG SC 1.4.10 (Reflow) and intentionally hidden content"
- Previous message: glen walker: "Re: WCAG SC 1.4.10 (Reflow) and intentionally hidden content"
- Next message in Thread: None
- Previous message in Thread: Aaron Krug: "Question about search form label"
- View all messages in this Thread