privacycg / private-click-measurement

Private Click Measurement
https://privacycg.github.io/private-click-measurement/
198 stars 8 forks source link

Lowercase or camelcase anchor attributes? #90

Closed johnwilander closed 2 years ago

johnwilander commented 3 years ago

We should align on casing for our HTML anchor attributes. Such as:

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.)

johnwilander commented 3 years ago

Ping @annevk and @hober who've provided valuable input on this previously.

gsnedders commented 3 years ago

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?

johnwilander commented 3 years ago

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.

johnwilander commented 3 years ago

Lowercase means I should fix the spec.

gsnedders commented 3 years ago

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.

johnwilander commented 3 years ago

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?

annevk commented 3 years ago

Yeah, those are called IDL attributes in the HTML Standard. (The others are content attributes.)

johnwilander commented 2 years ago

Change landed in WebKit: https://trac.webkit.org/changeset/283342/webkit Resolving.