- From: r12a via GitHub <sysbot+gh@w3.org>
- Date: Fri, 21 Oct 2016 10:11:46 +0000
- To: www-international@w3.org
r12a has just labeled an issue for https://github.com/w3c/webvtt as "i18n": == Expose the fallback language in the API == In #257 I made it possible for the "List of WebVTT Node Objects" object to have an "applicable language", but this can't be exposed in `getCueAsHTML()` since that object maps to a `DocumentFragment`, which can't have a `lang` attribute. One way to make this work is to change from `DocumentFragment` to an HTML `div` or `span` element, and set `lang` on it if is has an "applicable language". Existing scripts that just insert whatever comes out of `getCueAsHTML()` to the document should continue to work, it would just get an extra element. I suppose `span` is a bit more versatile than `div` because it is allowed in more places (e.g. in a `p` element). OTOH, just dumping all cues and have them be separated from each other by default could be nice. An alternative could be to have the fallback language be a property of `TextTrack`, and have JS be responsible for setting a `lang` attribute on a container element in which it inserts cues with `getCueAsHTML()`. See https://github.com/w3c/webvtt/issues/258
Received on Friday, 21 October 2016 10:11:55 UTC