This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28469 - [WebVTT] Should more specific HTML objects be used for the WebVTT objects [CSS-feedback]
Summary: [WebVTT] Should more specific HTML objects be used for the WebVTT objects [CS...
Status: RESOLVED DUPLICATE of bug 22154
Alias: None
Product: TextTracks CG
Classification: Unclassified
Component: WebVTT (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: Web Media Text Tracks CG
URL:
Whiteboard: widereview
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-12 10:57 UTC by Silvia Pfeiffer
Modified: 2016-10-11 17:52 UTC (History)
5 users (show)

See Also:


Attachments

Description Silvia Pfeiffer 2015-04-12 10:57:48 UTC
Feedback by the CSS WG, see http://lists.w3.org/Archives/Public/public-tt/2015Apr/0007.html

Section 5.5: Some people wonder if HTMLElement is the right type to use for all the nodes, or if it is better to use more specific subclasses.
Comment 1 Philip J├Ągenstedt 2015-04-15 09:14:19 UTC
This isn't meant to imply that the interface type is HTMLElement, it can also be a child interface like HTMLSpanElement. That's how it's implemented, try this in a console:

new VTTCue(0,0,'<lang en>j').getCueAsHTML().firstChild // HTMLSpanElement

Other than spelling out the specific types where they exist, is there any other way to clarify this?
Comment 2 Simon Pieters 2015-04-21 10:29:14 UTC
Let's see. I thought HTMLElement was in fact the correct interface for all these elements, but it turns out <span> should indeed be HTMLSpanElement. We should fix it.

WebVTT Class Object	HTMLElement element node with localName "span".
WebVTT Voice Object	HTMLElement element node with localName "span", and a title attribute set to the WebVTT Voice Object's value.
WebVTT Language Object	HTMLElement element node with localName "span", and a lang attribute set to the WebVTT Language Object's applicable language.
https://html.spec.whatwg.org/multipage/semantics.html#the-span-element
These should be HTMLSpanElement.

WebVTT Italic Object	HTMLElement element node with localName "i".
https://html.spec.whatwg.org/multipage/semantics.html#the-i-element
Correct as is.

WebVTT Bold Object	HTMLElement element node with localName "b".
https://html.spec.whatwg.org/multipage/semantics.html#the-b-element
Correct as is.

WebVTT Underline Object	HTMLElement element node with localName "u".
https://html.spec.whatwg.org/multipage/semantics.html#the-u-element
Correct as is.

WebVTT Ruby Object	HTMLElement element node with localName "ruby".
https://html.spec.whatwg.org/multipage/semantics.html#the-ruby-element
Correct as is.

WebVTT Ruby Text Object	HTMLElement element node with localName "rt".
https://html.spec.whatwg.org/multipage/semantics.html#the-rt-element
Correct as is.
Comment 3 Silvia Pfeiffer 2015-06-07 07:58:20 UTC
(In reply to Simon Pieters from comment #2)
> Let's see. I thought HTMLElement was in fact the correct interface for all
> these elements, but it turns out <span> should indeed be HTMLSpanElement.

HTMLSpanElement inherits from HTMLElement. Objects of that type are still also of the HTMLElement type, I would think.
Comment 4 Simon Pieters 2016-02-19 21:22:11 UTC
(This was fixed in https://github.com/w3c/webvtt/commit/010695fd0b9527bf606256a846633eaa66da9e94 )

*** This bug has been marked as a duplicate of bug 22154 ***
Comment 5 David Singer 2016-10-11 17:52:43 UTC
HTMLElement no longer mentioned,