WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Form Labels & Lift

for

From: Tim Luoma
Date: Aug 5, 2002 2:25PM


Ali Naito wrote:

> 1 - the ID cannot begin with a number (although i saw an example of this on
> w3c.org)

It depends on what standard you want to go with

XHTML:
C.8. Fragment Identifiers

Note that the collection of legal values in XML 1.0 Section 2.3,
production 5 is much larger than that permitted to be used in the ID and
NAME types defined in HTML 4. When defining fragment identifiers to be
backward-compatible, only strings matching the pattern
[A-Za-z][A-Za-z0-9:_.-]* should be used. See Section 6.2 of [HTML4] for
more information.

Source for above: http://www.w3.org/TR/xhtml1/#C_8

HTML:
(Section 6.2, quoted above):
ID and NAME tokens must begin with a letter ([A-Za-z]) and may be
followed by any number of letters, digits ([0-9]), hyphens ("-"),
underscores ("_"), colons (":"), and periods (".").

Source: http://www.w3.org/TR/html4/types.html#h-6.2


Result: I only use A-Za-z for the first character in an ID

TjL



----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/