Re: [csswg-drafts] [selectors] `:lang` for documents without content language and for elements of unknown language; consider `:lang("")` over `:not(:lang("*"))` (#6915)

The CSS Working Group just discussed `:lang() again`, and agreed to the following:

* ``RESOLVED: `lang=und` matches :lang("*")`, `lang=""` doesn't match any `:lang()` ``

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> Topic: :lang() again<br>
&lt;TabAtkins> github: https://github.com/w3c/csswg-drafts/issues/6915#issuecomment-1247024928<br>
&lt;TabAtkins> Rossen_: So question was incosnistency between empty string and und both being "undefined", but they match differently<br>
&lt;fantasai> dbaron dropped a link to the "und" definition in https://www.rfc-editor.org/rfc/rfc5646.html#page-56<br>
&lt;TabAtkins> florian: Empty string is defined to mean "undefined" by HTML. "und" is defined as "undefined by ISO [something]<br>
&lt;TabAtkins> florian: Possibly HTML shoudln't have introduced another value to mean the same thing<br>
&lt;TabAtkins> florian: but it did<br>
&lt;TabAtkins> florian: i18n group was somewhat struggling with whether to unify it or not<br>
&lt;TabAtkins> florian: Could b epushed back, but logic was that HTML didn't unify them, and when we do the string matching of lang selectors we do string matching without worrying about the semantics<br>
&lt;TabAtkins> florian: So our :lang() just does standard lang string parsing + matching<br>
&lt;TabAtkins> florian: So logic was probably "just keep it simple"<br>
&lt;TabAtkins> florian: In practice HTML semantics somewhat combine both "explicitly undetermined" and "author couldn't be bothered to specify".<br>
&lt;TabAtkins> florian: but generally, this is a space where we dont' control the semantics<br>
&lt;TabAtkins> florian: But I don't think i18n was firm on the conclusion, so if we want to push back it could b eheard<br>
&lt;fantasai> TabAtkins: That does answer the question<br>
&lt;fantasai> TabAtkins: I think I'd be happier if we push back<br>
&lt;fantasai> TabAtkins: but having this distinction from HTML be reflected in our Selectors should be avoided if possible<br>
&lt;TabAtkins> florian: I think what happened in practice is th eobservation is that "und" wasn't really used on the web, so empty string is how it was actually done in HTML<br>
&lt;TabAtkins> florian: So effectively we can ignore the "und" value and have :lang("*") match everything *but* the empty string.<br>
&lt;TabAtkins> florian: And so while technicaly "und" matches the lang, in practice udnefined langs don't match it<br>
&lt;TabAtkins> fantasai: Yeah, "*" matches "und", but we've had a request for "can I match things without a language", and we'd be able lto do that if we make a distinction in this manner<br>
&lt;TabAtkins> jfkthame: I think this is a distinctino we should maintain, seems there is a semantic difference between lang being undefined/untagged and explicitly tagged as undetermined<br>
&lt;PaulG> q+<br>
&lt;TabAtkins> My position is very weak, I defer to whoever has expertise<br>
&lt;PaulG> q-<br>
&lt;TabAtkins> jfkthame: I agree "und" is rarely used but it does seem semantically meaningful<br>
&lt;Rossen_> ack fantasai<br>
&lt;Zakim> fantasai, you wanted to point out * semantics<br>
&lt;PaulG> q+<br>
&lt;fantasai> TabAtkins: If we accept to keep distinct, we don't need to push back. Since several ppl think it's good to keep separate, I'm ok with that<br>
&lt;TabAtkins> florian: The group that came up with the original rec was just weakly leaning - I think they got it right, but still<br>
&lt;Rossen_> ack PaulG<br>
&lt;TabAtkins> PaulG: AGree with keeping them separate. I suspect coalescing would encourage more "und", where default lang choice is used when undefined, but I think it shouldn't when it's explicitly "undetermined"<br>
&lt;TabAtkins> Sounds good to me<br>
&lt;TabAtkins> (I appreciate the "undefined" vs "undetermined" distinction. Was just objecting to two separate "undefined" notions.)<br>
&lt;TabAtkins> Rossen_: Objections?<br>
&lt;TabAtkins> RESOLVED: `lang=und` matches :lang("*")`, `lang=""` doesn't match any `:lang()`<br>
&lt;fantasai> scribenick: fantasai<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6915#issuecomment-1276450157 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 12 October 2022 16:33:47 UTC