WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: ID and label tags in HTML

for

Number of posts in this thread: 9 (In chronological order)

From: Hoffman, Allen
Date: Tue, Oct 19 2010 10:33AM
Subject: ID and label tags in HTML
No previous message | Next message →

Does anyone know if the HTMOL spec for ID and label for form fields is
supposed to be case sensitive or not?


Allen Hoffman

From: Bill Mason
Date: Tue, Oct 19 2010 10:42AM
Subject: Re: ID and label tags in HTML
← Previous message | Next message →

On 10/19/10 9:31 AM, Hoffman, Allen wrote:
> Does anyone know if the HTMOL spec for ID and label for form fields is
> supposed to be case sensitive or not?

According to the HTML 4 spec, yes.

I don't recall offhand what browsers do in practice. And I'm not clear
at a glance at it what the HTML 5 spec says on this issue.
--
Bill Mason
= EMAIL ADDRESS REMOVED =

From: William Lawrence
Date: Tue, Oct 19 2010 11:09AM
Subject: Re: ID and label tags in HTML
← Previous message | Next message →

> Does anyone know if the HTMOL spec for ID and label for form fields is
> supposed to be case sensitive or not?

Yes, the values in HTML and XHTML elements must be treated as
case-sensitive. The value of the FOR attribute is case-sensitive
(i.e., user agents interpret "a" and "A" differently).

Although the WAVE toolbar from WebAim will not identify this as an
issue to identify, you ought to try writing up a little test for it
and trying out how different browsers will interpret the results.

You can find out more information at
http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.9.1

Cheers!
William
--
William Lawrence
Accessibility Engineer

From: Jared Smith
Date: Tue, Oct 19 2010 2:18PM
Subject: Re: ID and label tags in HTML
← Previous message | Next message →

On Tue, Oct 19, 2010 at 11:09 AM, William Lawrence wrote:

> Yes, the values in HTML and XHTML elements must be treated as
> case-sensitive. The value of the FOR attribute is case-sensitive
> (i.e., user agents interpret "a" and "A" differently).

Firefox and most other browsers properly enforce the case sensitivity
requirements of HTML id references. Internet Explorer does not. If you
use the common technique of clicking on form labels to see if the
properly associated form element receives focus, be sure to do this
test in something other than IE to ensure true accessibility in other
browsers.

> Although the WAVE toolbar from WebAim will not identify this as an
> issue...

Correction - although the WAVE toolbar from WebAIM DOES NOT YET
identify this as an issue...

This is something we've already identified to be flagged in the next
version of WAVE.

Jared Smith
WebAIM

From: Hoffman, Allen
Date: Wed, Oct 20 2010 3:27PM
Subject: Re: ID and label tags in HTML
← Previous message | Next message →

Does this show up in a W3C validator?


-----Original Message-----
From: Jared Smith [mailto: = EMAIL ADDRESS REMOVED = ]
Sent: Tuesday, October 19, 2010 4:17 PM
To: WebAIM Discussion List
Subject: Re: [WebAIM] ID and label tags in HTML

On Tue, Oct 19, 2010 at 11:09 AM, William Lawrence wrote:

> Yes, the values in HTML and XHTML elements must be treated as
> case-sensitive. The value of the FOR attribute is case-sensitive
> (i.e., user agents interpret "a" and "A" differently).

Firefox and most other browsers properly enforce the case sensitivity
requirements of HTML id references. Internet Explorer does not. If you
use the common technique of clicking on form labels to see if the
properly associated form element receives focus, be sure to do this
test in something other than IE to ensure true accessibility in other
browsers.

> Although the WAVE toolbar from WebAim will not identify this as an
> issue...

Correction - although the WAVE toolbar from WebAIM DOES NOT YET
identify this as an issue...

This is something we've already identified to be flagged in the next
version of WAVE.

Jared Smith
WebAIM

From: Sailesh Panchang
Date: Thu, Oct 21 2010 7:45AM
Subject: Re: ID and label tags in HTML
← Previous message | Next message →

I do not consider this as a validation issue. This refers to the
content of the id-value and logically one will expect it to work like
a user name field on a login screen where case usually matters.
If one were using xhtml and used "ID=" instead of "id=", that would
stand out as a validation issue.
Sailesh Panchang

On 10/20/10, Hoffman, Allen < = EMAIL ADDRESS REMOVED = > wrote:
> Does this show up in a W3C validator?
>
>

From: Accessibility India
Date: Thu, Oct 21 2010 7:51AM
Subject: Re: ID and label tags in HTML
← Previous message | Next message →

I too agree with Sialesh.

On 10/19/10, Bill Mason < = EMAIL ADDRESS REMOVED = > wrote:
> On 10/19/10 9:31 AM, Hoffman, Allen wrote:
>> Does anyone know if the HTMOL spec for ID and label for form fields is
>> supposed to be case sensitive or not?
>
> According to the HTML 4 spec, yes.
>
> I don't recall offhand what browsers do in practice. And I'm not clear
> at a glance at it what the HTML 5 spec says on this issue.
> --
> Bill Mason
> = EMAIL ADDRESS REMOVED =
>

From: William Lawrence
Date: Thu, Oct 21 2010 8:18AM
Subject: Re: ID and label tags in HTML
← Previous message | Next message →

On Wed, Oct 20, 2010 at 5:25 PM, Hoffman, Allen < = EMAIL ADDRESS REMOVED = > wrote:
> Does this show up in a W3C validator?

The case-sensitivity of the for attribute IS a validation issue in
XHTML 1.0 Strict & Transitional, XHTML 1.1, and HTML5.

The case-sensitivity of the for attribute IS NOT a validation issue in
HTML 4.01 Strict & Transitional.

The case-sensitivity of the for attribute IS an accessibility issue
irregardless of doctype.

More information can be found regarding the label element in HTML4 at
http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#h-17.9
and the differences between HTML4 and XHTML regarding case-sensitivity
of attribute values at http://www.w3.org/TR/xhtml1/#h-4.11

On Tue, Oct 19, 2010 at 4:16 PM, Jared Smith < = EMAIL ADDRESS REMOVED = > wrote:
> Correction - although the WAVE toolbar from WebAIM DOES NOT YET
> identify this as an issue...
> This is something we've already identified to be flagged in the next
> version of WAVE.

My apologies; I stand corrected and thanks Jared for the clarification. ;-)

Cheers!
William

From: Hoffman, Allen
Date: Fri, Oct 22 2010 8:06AM
Subject: Re: ID and label tags in HTML
← Previous message | No next message

This is excellent.
Thanks all.


-----Original Message-----
From: William Lawrence [mailto: = EMAIL ADDRESS REMOVED = ]
Sent: Thursday, October 21, 2010 10:13 AM
To: WebAIM Discussion List
Subject: Re: [WebAIM] ID and label tags in HTML

On Wed, Oct 20, 2010 at 5:25 PM, Hoffman, Allen < = EMAIL ADDRESS REMOVED = > wrote:
> Does this show up in a W3C validator?

The case-sensitivity of the for attribute IS a validation issue in
XHTML 1.0 Strict & Transitional, XHTML 1.1, and HTML5.

The case-sensitivity of the for attribute IS NOT a validation issue in
HTML 4.01 Strict & Transitional.

The case-sensitivity of the for attribute IS an accessibility issue
irregardless of doctype.

More information can be found regarding the label element in HTML4 at
http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#h-17.9
and the differences between HTML4 and XHTML regarding case-sensitivity
of attribute values at http://www.w3.org/TR/xhtml1/#h-4.11

On Tue, Oct 19, 2010 at 4:16 PM, Jared Smith < = EMAIL ADDRESS REMOVED = > wrote:
> Correction - although the WAVE toolbar from WebAIM DOES NOT YET
> identify this as an issue...
> This is something we've already identified to be flagged in the next
> version of WAVE.

My apologies; I stand corrected and thanks Jared for the clarification. ;-)

Cheers!
William