-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify "Valid BCP47 language tag" #217
Comments
agree, we want authors to write ‘valid’ tags, and maybe we state that there is no requirement on user-agents to check validity?
David Singer |
Actually, I don't think so. 'valid' means that implementations do check the registry. Ian and I did discuss the intentions of HTML5's statement in 3.2.5.3 of that document and there's a bit of cheese later on in that section that clarifies that the 'must' that you refer to is not actually a validation requirement. This still strikes me as odd and open to misinterpretation and that's why I generally try to get other specs to be clearer. For most specs, there is no advantage to be gained by requiring any validation and so that's generally what I recommend to spec writers: don't require any particular format, but do guide people to do the right thing.
If you don't require but do allow validation, then some implementations might choose to reject invalid or not-well-formed tags. That might represent a interoperability problem that you probably don't want. Generally my recommendation for specs is to use one of these strategies:
|
We don't want to allow validation in UAs. But we still want to require validation in validators. |
I just filed bug https://www.w3.org/Bugs/Public/show_bug.cgi?id=29179 in relation to validation behaviour being separate to UA behaviour, in response to @zcorpan's comment above. The term 'validator' is used in the Conformance section but not defined, and no separate requirements are defined for validators vs UAs in the spec. |
@zcorpan Note that language tag validation is sensitive to the copy of the IETF language subtag registry (LSTR) used. Registrations and changes occur regularly in the LSTR. There are stability guarantees of various kinds (tags never become invalid once they are valid), but newly valid possibilities are created regularly. Again, my suggestion would be to require well-formed checking in validators and suggest/permit validity checking as potential warnings to be emited. Also note that there are extensions to BCP 47 (two of them currently) and these may not be validated by a validator (the extensions are not very relevant to WebVTT in any case) even if the base language tag is validated. I'm sorry this is complicated :-). |
That new tags are added regularly is not a problem. Validator.nu already uses the registry for validating HTML.
But why? Why not require authors to only use registered language tags, and have validators to emit an error if an unregistered language tag is used? |
@aphillips could you confirm that the resolution in #255 and #256 are satisfactory for your issue registered in https://www.w3.org/Bugs/Public/show_bug.cgi?id=28263 and discussed here? |
In I18N's housekeeping of 2020-03-26 we noticed that we had not replied to this issue. Just now I made a couple of minor comments on #256. I also noticed a separate issue in #255 which I'll track separately. The language tag comment in that review is minor, but since the note in question is related to conformance, potentially not editorial. Sorry to be so tardy in our response. |
I think (b) is intended. HTML has the same requirement for its
lang
attribute. But it's not a requirement on implementations in HTML and WebVTT, but on authors.https://www.w3.org/Bugs/Public/show_bug.cgi?id=28255#c17
The text was updated successfully, but these errors were encountered: