Closed johnwilander closed 2 years ago
Ping @annevk and @hober who've provided valuable input on this previously.
Are we talking about the HTML attributes or the WebIDL attributes here?
HTML attributes are converted by the parser to lowercase, so I'd expect us to use lowercase there (as otherwise you could only set the attributes through the DOM).
For WebIDL there's no case-conversion done, so that's where the question is, right?
TAG prefers lowercase: https://w3ctag.github.io/design-principles/#casing-rules
As pointed out by Charlie in https://github.com/WICG/conversion-measurement-api/issues/238#issuecomment-929651243.
Lowercase means I should fix the spec.
The status quo seems to be:
TAG prefers lowercase: https://w3ctag.github.io/design-principles/#casing-rules
For the HTML attribute yes, and prefers camel-case for WebIDL attributes. Which implies the spec is right.
For the HTML attribute yes, and prefers camel-case for WebIDL attributes. Which implies the spec is right.
Oh, you're referring to programmatic accessors such as element.attributionSourceId
?
Yeah, those are called IDL attributes in the HTML Standard. (The others are content attributes.)
Change landed in WebKit: https://trac.webkit.org/changeset/283342/webkit Resolving.
We should align on casing for our HTML anchor attributes. Such as:
attributionsourceid
orattributionSourceId
attributiondestination
orattributionDestination
attributionsourcenonce
orattributionSourceNonce
Here's where we are today:
The HTML spec is not super clear but looks to lean toward lowercase:
Maybe there is a clear directive that I have missed?
(This issue mirrors the one I filed on ARA.)