Conversation
|
Marking as Ready for Review despite there being some TODOs remaining in the diff. Feedback requested from @gkatsev, @silviapfeiffer, @nigelmegitt, @eric-carlson, @chrisn, @bdougherty, et al. |
|
I think this PR is merge-ready now once a TTWG reviewer approves. The previously included TODO comments are now removed from this PR in favor of addressing that follow-on work in: |
nigelmegitt
left a comment
There was a problem hiding this comment.
I think this would benefit from more clarity (i.e. more text) about the intended use of ATTRIBUTES and its relationship to attributes on the HTML <track> element, and any other potential usage context.
|
Needs a review from the Editor, @gkatsev . |
|
See also another operational practice described for doing this at #485 (comment) in which YouTube is doing it in the Header section. We should probably make sure that whatever we specify here aligns with practice, or if not, that folk using that alternative approach are happy to change. Update: @gkatsev had the action to draft a PR to resolve #485, and that looks to me as though it would overlap strongly with this PR. |
gkatsev
left a comment
There was a problem hiding this comment.
Thanks for the work on this @cookiecrook and for your patience!
What YouTube has definitely seems to align with it. Would be great if we can find someone from there to comment on this, if they could potentially move to the new block when it exists.
I think ultimately, particularly, with HLS's usage of the header, we do still want the header as "point of extensibility" there. But, we may want to discourage new uses of it, since the majority of these use cases could use the ATTRIBUTES block. As an example, the ECMAScript spec added the |
|
@gkatsev wrote:
Yes, I have taken that as an action. |
|
The Timed Text Working Group just discussed
The full IRC log of that discussion<nigel> Subtopic: New ATTRIBUTES block #523<nigel> github: https://github.com//pull/523 <nigel> jcraig: Need to assess, if there's a mismatch, which one wins. <nigel> .. I don't have a strong opinion. <nigel> .. Main reason we want it in the VTT is sometimes there's no HTML as an intermediary, <nigel> .. so the track information is missing. <nigel> gkatsev: That makes sense, my question would be would this also allow a change in HTML <nigel> .. if we're adding precedence to those attributes. <nigel> jcraig: I would expect that whatever we land on, we could have the same thing reflected on the track element <nigel> eric_carlson: We also would want to add some text to the spec describing the rules of precedence, <nigel> .. whichever way we go. <nigel> Nigel: How are you going to work out which way to go? <nigel> eric_carlson: We'll put a stick in the ground and we'll be right. <nigel> gkatsev: My assumption is the track element takes precedence <nigel> eric_carlson: That would be right, it would override what's in the file. <nigel> gkatsev: Can still have the precedence rules in the VTT spec but would also need them in HTML <nigel> eric_carlson: HTML doesn't say anything about how to process the contents of the VTT file, <nigel> .. so maybe no change needed. <nigel> jcraig: The other editorial suggestions seem fine to me. <nigel> .. There was a section question, was just my unfamiliarity with bikeshed. <nigel> gkatsev: Should we open an HTML issue now around this to get the conversation going. <nigel> jcraig: I'll take that as an action and write it into PR 523 so I don't forget it. <nigel> pal: On that last point, if you run into any issues, I can help, please don't hesitate to ask. <nigel> jcraig: You mean pushback on HTML? <nigel> pal: Sure, ultimately the question is who writes those tests. <nigel> .. As Nigel pointed out there's a large body of tests to port to WPT. <nigel> .. With reference renderers once we've overcome the issue of should we have that at all in WPT, <nigel> .. I'm confident that we'll have the resources to make that happen. <nigel> group confusion caused because Pierre misheard! <nigel> gkatsev: With that we can, unless there's anything specific to WebVTT right now we can end <nigel> SUMMARY: @cookiecrook to raise issue on HTML about track attribute precedence |
|
I've also taken an action to file an issue to HTML to propose any reflected attributes from the VTT to HTML Track content attributes. |
|
@zcorpan wrote:
There were multiple metadata uses in the wild. Supporting both could ease that transition for authors already utilizing = as the delimiter, but I question if that's worthwhile to add to the parser, since those actors can already continue with their usage of =-delimited VTT metadata without the ATTRIBUTES block. Is it's really worth it to permanently enshrine this non-conforming usage into the parser?
No... unless there has been a recent change, YT uses capitalized key/value pairs outside a block... e.g.
Significant changes made as a |
|
Also @nigelmegitt asked about internationalization and unicode. I've updated this portion significantly, including clarification that, of the key/value pairs, only the keys are ASCII; the values allow Unicode, other than some multi-line and bi-directional exceptions. In prior conversations, the WG feedback seemed to indicate a limited character set was desirable for the keys a number of reasons, including simplified case-folding, avoidance of visibly similar characters or other masked content like zero-width joiners, etc. Do you feel strongly that the keys should also allow the full Unicode charset? |
|
Open Question: I changed the |
| <code>type</code> is valid but parsers may generate a warning.</p> | ||
| </dd> | ||
|
|
||
| <dt><dfn lt="WebVTT attributes object language">A language</dfn></dt> |
There was a problem hiding this comment.
Open question here re: consistency of language vs lang vs srclang.
#523 (comment)
I would suggest aligning with XML Name as closely as possible for the keys - this is what XML permits for attribute names. That goes beyond ASCII while still being a restricted set. I have not checked if there are any permitted code points that would cause parsing difficulties in WebVTT. Alternatively a definition coincident with the WHATWG definition of attribute name could be used, but is a little less clear in my view. |
|
Open Question @nigelmegitt wrote:
Both XML Name and HTML attribute name can be hyphenated... such as Regardless, I'm happy to take the working group's decision on this point, whatever that is. I'm collating a list of "Open Questions" here for an in-person discussion. Once we wrap up as much as we can in the thread, I'll research and summarize the remaining opens before scheduling more time with the WG. |
Not sure how big a deal this is? People generally work around this kind of pattern in their chosen programming language. For example there are many CSS properties including a hyphen, such as |
|
I still think this should be in the header instead of a new block (see #523 (review) ). |
|
I think we should not use XML Name. WebVTT already borrows HTML syntax and parsing for named character references; it would be inconsistent and unnecessary to use XML syntax for something else in WebVTT. HTML attribute name syntax prevents |
|
@zcorpan wrote:
There are several existing in-the-wild use cases that would become non-conforming if this wasn't a new block. Those existing ambiguous, loosely defined or entirely undefined uses of VTT metadata will continue to persist in perpetuity. I recall a a core TTWG member (@gkatsev IIRC) suggested the [Update: @gkatsev proposed METADATA (# or #:~:text), but either @eric-carlson or I renamed it to ATTRIBUTES to avoid redundancy, since it's primary use will be for |
It's true, the design choices made historically for WebVTT have been extremely XML-unfriendly, so maintaining separation from XML would be consistent. However, since we are primarily talking about metadata, and there may be use cases where folk want to transfer keys and values to/from other syntaxes, it would be good to be as open as possible within those existing constraints to minimise the need to rename keys.
Or remove the requirement for the e.g. |
They will not become non-conforming, they are already non-conforming. The space for headers in the spec was reserved for the standards' own future use, it was not intended for private use (hence it is currently non-conforming to have anything there). In fact, the opposite is true: if we start allowing custom headers, then existing content that has custom headers, assuming the syntax matches what we allow, such content can go from non-conforming to conforming. I think this shouldn't be a goal, though, only that we shouldn't shy away from using the spec's intended space for future extensibility because users of the spec have broken the contract and are using invalid WebVTT.
Yeah the interesting question is whether it would break any existing usage if we add some standardized attributes in the header. If they keys used in the wild are different from the ones we're standardizing, then nothing will break, as far as I can tell. Even if the key is the same, so long as the value is different, still nothing would break. What is the web compat issue? |
IMO this makes it less clear that they are key/value pairs, and it's inconsistent with WebVTT cue settings. |
The I also just remembered that some classification schemas etc for metadata use URNs for keys, which often include |
|
That looks like a spec bug. The syntax for each individual cue setting requires the Edit: filed #541 |
Open Questions for TTWG Meeting Discussion (Date TBD)
|
|
@nigelmegitt @gkatsev @zcorpan Please help if I missed anything in summary of open questions above. Thanks. I know that @eric-carlson would like to attend said meeting, and is out this week. My next availability at the normal TTWG meeting time (8am Pacific) is April 9th or April 23rd. |
|
My next availability is also April 9th. I still need to review the new discussion but should note that I'm leaning towards using the headers space assuming that we allow non-conforming usage like mentioned here #523 (comment) |
|
Agenda for TTWG 2026-04-09 is w3c/ttwg#331, which I'm unable to attend, but have added this as a possible agenda item. 23rd April would work for me, alternatively. |
To clarify, I objected to the claim that existing WebVTT content would go from being conforming to being non-conforming, as it's currently invalid WebVTT to use non-blank lines immediately after the There could be a webcompat concern, but it's separate from whether existing content is conforming or non-conforming. I asked for examples where the new processing of headers would break existing content. The fact that existing content is using headers doesn't mean that that content will break if browsers start to process some known headers with some known values. I think there's only a potential issue if the standardized key and value are exactly the same as what already exists in the wild, but the semantics are different. |
If we don't need to allow characters outside of ASCII, an option is to align with HTML PI target: whatwg/html#12118 Right now it's |
Since the metadata keys may originate or relate to schemas external to WebVTT and to HTML, my view is that only allowing ASCII characters is likely to be overly restrictive. It's also unnecessary to be so limiting. |
|
Since Nigel can't make it on April 9th, can everyone make it on April 23rd? If not, let's go ahead with April 9th. |
|
Yeah, I think the 23rd works a bit better for me as well. We're going to cancel the April 9th meeting and have the agenda item be on the 23rd. |
…e subtitles example.
Closes #511
Add new ATTRIBUTES block parsing rules and examples as discussed in #511.
This is also a prerequisite for:
…and its duplicate in the WHATWG repo:
whatwg/html#11333
Preview | Diff