E-mail List Archives
Thread: label tag with form elements
Number of posts in this thread: 6 (In chronological order)
From: Mickey Williamson
Date: Fri, Mar 13 2015 7:09AM
Subject: label tag with form elements
No previous message | Next message →
If you're using the "for" attribute in the label tag, is there any reason
to also wrap the input in the label tag?
Any benefit to this:
<label for="myinput">Label text<input id="myinput" type="text"
name="textfield"></label>
over this:
<label for="myinput">Label text</label>
<input id="myinput" type="text" name="textfield">
Thanks,
Mickey
From: Steve Faulkner
Date: Fri, Mar 13 2015 7:12AM
Subject: Re: label tag with form elements
← Previous message | Next message →
>
> Any benefit
no
--
Regards
SteveF
HTML 5.1 <http://www.w3.org/html/wg/drafts/html/master/>
On 13 March 2015 at 13:09, Mickey Williamson <
= EMAIL ADDRESS REMOVED = > wrote:
> If you're using the "for" attribute in the label tag, is there any reason
> to also wrap the input in the label tag?
>
> Any benefit to this:
>
> <label for="myinput">Label text<input id="myinput" type="text"
> name="textfield"></label>
>
> over this:
>
> <label for="myinput">Label text</label>
> <input id="myinput" type="text" name="textfield">
>
> Thanks,
> Mickey
> > > >
From: Mickey Williamson
Date: Fri, Mar 13 2015 9:05AM
Subject: Re: label tag with form elements
← Previous message | Next message →
Excellent. Thank you!
On Fri, Mar 13, 2015 at 9:12 AM, Steve Faulkner < = EMAIL ADDRESS REMOVED = >
wrote:
> >
> > Any benefit
>
>
> no
>
> --
>
> Regards
>
> SteveF
> HTML 5.1 <http://www.w3.org/html/wg/drafts/html/master/>
>
> On 13 March 2015 at 13:09, Mickey Williamson <
> = EMAIL ADDRESS REMOVED = > wrote:
>
> > If you're using the "for" attribute in the label tag, is there any reason
> > to also wrap the input in the label tag?
> >
> > Any benefit to this:
> >
> > <label for="myinput">Label text<input id="myinput" type="text"
> > name="textfield"></label>
> >
> > over this:
> >
> > <label for="myinput">Label text</label>
> > <input id="myinput" type="text" name="textfield">
> >
> > Thanks,
> > Mickey
> > > > > > > >
> > > >
--
Michelle Williamson
Drupal Developer
T 678.580.1690 x205 F 770.360.5776
twitter <http://twitter.com/micnap> ' linkedin
<http://www2.mediacurrent.com/l/10072/2012-03-23/3qknq> ' mediacurrent
<http://www2.mediacurrent.com/l/10072/2012-03-23/3qkpd>
Awarded Best SMB
<https://t.yesware.com/tl/6228584989751eec7f7efd759b5a3987de150a8e/2db8247480f6e405a199c3227c223214/40a213898e1bbb2949c481a66986bb61?ytl=http%3A%2F%2Fwww.mediacurrent.com%2Fblog%2Fdrupal-agency-mediacurrent-awarded-best-overall-smb-salesforce>
by Salesforce.com
From: Graham Armfield
Date: Fri, Mar 13 2015 11:30AM
Subject: Re: label tag with form elements
← Previous message | Next message →
I use that construct if I want to put error messages after the input field,
but still within the label.
Eg:
<label for="email">Your email address
<input type="text" id="email"><br>
<span class="error">Please check email format</span></label>
Regards
Graham
On 13 Mar 2015 15:05, "Mickey Williamson" <
= EMAIL ADDRESS REMOVED = > wrote:
> Excellent. Thank you!
>
> On Fri, Mar 13, 2015 at 9:12 AM, Steve Faulkner < = EMAIL ADDRESS REMOVED = >
> wrote:
>
> > >
> > > Any benefit
> >
> >
> > no
> >
> > --
> >
> > Regards
> >
> > SteveF
> > HTML 5.1 <http://www.w3.org/html/wg/drafts/html/master/>
> >
> > On 13 March 2015 at 13:09, Mickey Williamson <
> > = EMAIL ADDRESS REMOVED = > wrote:
> >
> > > If you're using the "for" attribute in the label tag, is there any
> reason
> > > to also wrap the input in the label tag?
> > >
> > > Any benefit to this:
> > >
> > > <label for="myinput">Label text<input id="myinput" type="text"
> > > name="textfield"></label>
> > >
> > > over this:
> > >
> > > <label for="myinput">Label text</label>
> > > <input id="myinput" type="text" name="textfield">
> > >
> > > Thanks,
> > > Mickey
> > > > > > > > > > > >
> > > > > > > >
>
>
>
> --
>
>
> Michelle Williamson
> Drupal Developer
> T 678.580.1690 x205 F 770.360.5776
> twitter <http://twitter.com/micnap> * linkedin
> <http://www2.mediacurrent.com/l/10072/2012-03-23/3qknq> * mediacurrent
> <http://www2.mediacurrent.com/l/10072/2012-03-23/3qkpd>
>
> Awarded Best SMB
> <
> https://t.yesware.com/tl/6228584989751eec7f7efd759b5a3987de150a8e/2db8247480f6e405a199c3227c223214/40a213898e1bbb2949c481a66986bb61?ytl=http%3A%2F%2Fwww.mediacurrent.com%2Fblog%2Fdrupal-agency-mediacurrent-awarded-best-overall-smb-salesforce
> >
> by Salesforce.com
> > > >
From: Lynn Holdsworth
Date: Sun, Mar 15 2015 7:38AM
Subject: Re: label tag with form elements
← Previous message | Next message →
That construct didn't used to work in Supernova. Does it work now?
> On 13 Mar 2015, at 15:05, Mickey Williamson < = EMAIL ADDRESS REMOVED = > wrote:
>
> Excellent. Thank you!
>
> On Fri, Mar 13, 2015 at 9:12 AM, Steve Faulkner < = EMAIL ADDRESS REMOVED = >
> wrote:
>
>>>
>>> Any benefit
>>
>>
>> no
>>
>> --
>>
>> Regards
>>
>> SteveF
>> HTML 5.1 <http://www.w3.org/html/wg/drafts/html/master/>
>>
>> On 13 March 2015 at 13:09, Mickey Williamson <
>> = EMAIL ADDRESS REMOVED = > wrote:
>>
>>> If you're using the "for" attribute in the label tag, is there any reason
>>> to also wrap the input in the label tag?
>>>
>>> Any benefit to this:
>>>
>>> <label for="myinput">Label text<input id="myinput" type="text"
>>> name="textfield"></label>
>>>
>>> over this:
>>>
>>> <label for="myinput">Label text</label>
>>> <input id="myinput" type="text" name="textfield">
>>>
>>> Thanks,
>>> Mickey
>>> >>> >>> >> >> >> >
>
>
> --
>
>
> Michelle Williamson
> Drupal Developer
> T 678.580.1690 x205 F 770.360.5776
> twitter <http://twitter.com/micnap> ' linkedin
> <http://www2.mediacurrent.com/l/10072/2012-03-23/3qknq> ' mediacurrent
> <http://www2.mediacurrent.com/l/10072/2012-03-23/3qkpd>
>
> Awarded Best SMB
> <https://t.yesware.com/tl/6228584989751eec7f7efd759b5a3987de150a8e/2db8247480f6e405a199c3227c223214/40a213898e1bbb2949c481a66986bb61?ytl=http%3A%2F%2Fwww.mediacurrent.com%2Fblog%2Fdrupal-agency-mediacurrent-awarded-best-overall-smb-salesforce>
> by Salesforce.com
> > >
From: Steve Faulkner
Date: Sun, Mar 15 2015 3:40PM
Subject: Re: label tag with form elements
← Previous message | No next message
On 15 March 2015 at 13:38, Lynn Holdsworth < = EMAIL ADDRESS REMOVED = >
wrote:
> That construct didn't used to work in Supernova. Does it work now?
If supernova cannot support a code pattern that has been defined in a
standard and accessibility supported in browsers for a decade, I would
suggest it is a major bug in Supernova and needs to be fixed.
We cannot expect developers to avoid the use of standardised, interoperably
implemented, HTML code patterns because on piece of software is substandard.
--
Regards
SteveF
HTML 5.1 <http://www.w3.org/html/wg/drafts/html/master/>