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 23255 - [Custom]: Requirements on custom element type names
Summary: [Custom]: Requirements on custom element type names
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 14968
  Show dependency treegraph
 
Reported: 2013-09-16 14:10 UTC by Simon Pieters
Modified: 2013-10-05 11:52 UTC (History)
2 users (show)

See Also:


Attachments

Description Simon Pieters 2013-09-16 14:10:00 UTC
"The custom element type identifies a custom element interface and is a sequence of alphanumeric ASCII characters"

HTML's data-* attributes aren't restricted to alphanumeric ASCII. Why is the alphenumeric requirement there? Does it make sense for data-* also? Or vice versa?

Another thing is that the names should be required to be in ASCII lowercase, since the HTML parser case-folds.
Comment 1 Dimitri Glazkov 2013-10-04 19:21:46 UTC
I should just remove the "alpanumeric ASCII characters" bit. The NCName product is clearly specified just a few words later, and it's sufficient.

As far as the case is concerned, case-folding is only applicable in HTML documents. The definition construction algorithm does the actual work: https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html#dfn-definition-construction-algorithm
Comment 2 Dimitri Glazkov 2013-10-04 19:28:20 UTC
https://dvcs.w3.org/hg/webcomponents/rev/f790c96a29e3
Comment 3 Simon Pieters 2013-10-04 20:35:16 UTC
I think it's a bad idea to allow uppercase names in XHTML. It violates http://www.w3.org/TR/html-design-principles/#dom-consistency

data-* attributes are required to be in lowercase (in the ASCII range).
Comment 4 Dimitri Glazkov 2013-10-04 20:46:13 UTC
(In reply to Simon Pieters from comment #3)
> I think it's a bad idea to allow uppercase names in XHTML. It violates
> http://www.w3.org/TR/html-design-principles/#dom-consistency
> 
> data-* attributes are required to be in lowercase (in the ASCII range).

I don't have super-strong opinions here. If I remember correctly, I was just trying not to impose too many restrictions. Since SVG already has mixed-case names, and custom elements allow extending SVGElement, it seems only fair to let those extending SVG to use mixed case.
Comment 5 Simon Pieters 2013-10-04 20:58:25 UTC
SVG isn't going to introduce any new names with uppercase, since doing so would mean updating the case fixup tables in the HTML parser.
Comment 6 Dimitri Glazkov 2013-10-04 21:09:23 UTC
(In reply to Simon Pieters from comment #5)
> SVG isn't going to introduce any new names with uppercase, since doing so
> would mean updating the case fixup tables in the HTML parser.

Okay, so basically we should presume that all mixed-case names are mistakes of the past and we just force lowercase for all new elements? I am ok with that. Anne, Blake, how does this sound to you?
Comment 8 Anne 2013-10-05 11:52:43 UTC
ASCII lowercase, yes. Looks good.