This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 21282 - Add more specific prose/note clarifying allowed characters in ID names. (e.g., Can they start with a number now?)
Summary: Add more specific prose/note clarifying allowed characters in ID names. (e.g....
Status: VERIFIED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-14 06:44 UTC by contributor
Modified: 2013-06-01 12:49 UTC (History)
3 users (show)

See Also:


Attachments
CSS-Based Testcase for Recognized ID Attribute Values (1.55 KB, text/html)
2013-04-10 04:38 UTC, Patrick Dark
Details
DOM-Based Testcase for Recognized ID Attribute Values (2.24 KB, text/html)
2013-04-10 04:39 UTC, Patrick Dark
Details
CSS-Based Testcase for Recognized ID Attribute Values (Corrected) (1.56 KB, text/html)
2013-04-10 05:24 UTC, Patrick Dark
Details

Description contributor 2013-03-14 06:44:52 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html
Multipage: http://www.whatwg.org/C#the-id-attribute
Complete: http://www.whatwg.org/c#the-id-attribute

Comment:
Add more specific prose/note clarifying allowed characters in ID names. (e.g.,
Can they start with a number now?)

Posted from: 2602:30a:c002:6b60:9827:7b:250e:464b
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0
Comment 1 Patrick Dark 2013-04-10 04:38:37 UTC
Created attachment 1345 [details]
CSS-Based Testcase for Recognized ID Attribute Values
Comment 2 Patrick Dark 2013-04-10 04:39:03 UTC
Created attachment 1346 [details]
DOM-Based Testcase for Recognized ID Attribute Values
Comment 3 Patrick Dark 2013-04-10 05:19:43 UTC
Hello. I'm the bug reporter. Looks like I failed to CC myself.

The suggestion here is to add text explicitly stating that the character restrictions from HTML4 and XML no longer apply to id attribute values to put an end to confusion indicating that id attribute values, for example, cannot begin with a number (which has historically been the case). The testcases indicate that there are in fact no restrictions in practice anyway.

I'd suggesting adding a note such as: "Note: Historical restrictions on character content within ID names as specified by previous versions of HTML and by XML are not applicable to id attributes used in documents written to conform to this specification. For example, ID names may begin with any character, including numbers and underscores."
Comment 4 Patrick Dark 2013-04-10 05:24:57 UTC
Created attachment 1347 [details]
CSS-Based Testcase for Recognized ID Attribute Values (Corrected)

Corrected an issue with the original testcase.
Comment 5 contributor 2013-05-30 21:59:43 UTC
Checked in as WHATWG revision r7872.
Check-in comment: Clarify IDs are not restricted.
http://html5.org/tools/web-apps-tracker?from=7871&to=7872
Comment 6 Patrick Dark 2013-06-01 12:49:07 UTC
This addresses my concern. Thanks! Marking VERIFIED.