Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[acgiowt] (0) Add <lang> to WebVTT.

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=15922
Affected topics: HTML, Video Text Tracks

git-svn-id: http://svn.whatwg.org/webapps@7504 340c8d12-0b0e-0410-8428-c7bf67bfef74
(cherry picked from commit e9fd815)
  • Loading branch information...
commit a0cffd98e36a15915ead3c885308c1ab34b355d4 1 parent 1679b21
authored November 05, 2012 silviapfeiffer committed November 11, 2012

Showing 1 changed file with 100 additions and 77 deletions. Show diff stats Hide diff stats

  1. 177  source
177  source
@@ -30648,35 +30648,27 @@ href="?audio">audio&lt;/a> test instead.)&lt;/p></pre>
30648 30648
   tried, or to show text to the users of these older browsers informing
30649 30649
   them of how to access the video contents.</p>
30650 30650
 
30651  
-  <p class="note">In particular, this content is not intended to
30652  
-  address accessibility concerns. To make video content accessible to
30653  
-  the partially sighted, the blind, the hard-of-hearing, the deaf, and
30654  
-  those with other physical or cognitive disabilities, a variety of
30655  
-  features are available. Captions can be provided, either embedded in
30656  
-  the video stream or as external files using the <code>track</code>
30657  
-  element. Sign-language tracks can be provided, again either embedded
30658  
-  in the video stream or by synchronizing multiple <code>video</code>
30659  
-  elements using the <code
30660  
-  title="attr-media-mediagroup">mediagroup</code> attribute or a
30661  
-  <code>MediaController</code> object. Audio descriptions can be
30662  
-  provided, either as a separate track embedded in the video stream,
30663  
-  or a separate audio track in an <code>audio</code> element <span
30664  
-  title="slaved media elements">slaved</span> to the same controller
30665  
-  as the <code>video</code> element(s), or in text form using a
30666  
-<!--END dev-html--><!--END complete--><!--FORK-->
  30651
+  <p class="note">In particular, this content is not intended to address accessibility concerns. To
  30652
+  make video content accessible to the partially sighted, the blind, the hard-of-hearing, the deaf,
  30653
+  and those with other physical or cognitive disabilities, a variety of features are available.
  30654
+  Captions can be provided, either embedded in the video stream or as external files using the
  30655
+  <code>track</code> element. Sign-language tracks can be provided, again either embedded in the
  30656
+  video stream or by synchronizing multiple <code>video</code> elements using the <code
  30657
+  title="attr-media-mediagroup">mediagroup</code> attribute or a <code>MediaController</code>
  30658
+  object. Audio descriptions can be provided, either as a separate track embedded in the video
  30659
+  stream, or a separate audio track in an <code>audio</code> element <span title="slaved media
  30660
+  elements">slaved</span> to the same controller as the <code>video</code> element(s), or in text
  30661
+  form using a
  30662
+  <!--END dev-html--><!--END complete--><!--FORK-->
30667 30663
   caption file
30668  
-<!--START dev-html--><!--START complete--><!--END w3c-html--><!--FORK-->
  30664
+  <!--START dev-html--><!--START complete--><!--END w3c-html--><!--FORK-->
30669 30665
   <span>WebVTT file</span>
30670  
-<!--START w3c-html--><!--FORK-->
30671  
-  referenced using the <code>track</code> element and synthesized into
30672  
-  speech by the user agent. WebVTT can also be used to provide chapter
30673  
-  titles. For users who would rather not use a media element at all,
30674  
-  transcripts or other textual alternatives can be provided by simply
30675  
-  linking to them in the prose near the <code>video</code> element.
30676  
-<!--END w3c-html--><!--FORK-->
30677  
-  <a href="#refsWEBVTT">[WEBVTT]</a>
30678  
-<!--START w3c-html--><!--FORK-->
30679  
-  </p>
  30666
+  <!--START w3c-html--><!--FORK-->
  30667
+  referenced using the <code>track</code> element and
  30668
+  synthesized into speech by the user agent. WebVTT can also be used to provide chapter titles. For
  30669
+  users who would rather not use a media element at all, transcripts or other textual alternatives
  30670
+  can be provided by simply linking to them in the prose near the <code>video</code> element. <a
  30671
+  href="#refsWEBVTT">[WEBVTT]</a></p>
30680 30672
 
30681 30673
   <p>The <code>video</code> element is a <span>media element</span>
30682 30674
   whose <span>media data</span> is ostensibly video data, possibly
@@ -31063,27 +31055,14 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>
31063 31055
   tried, or to show text to the users of these older browsers informing
31064 31056
   them of how to access the audio contents.</p>
31065 31057
 
31066  
-  <p class="note">In particular, this content is not intended to
31067  
-  address accessibility concerns. To make audio content accessible to
31068  
-  the deaf or to those with other physical or cognitive disabilities,
31069  
-  a variety of features are available. If captions or a sign language
31070  
-  video are available, the <code>video</code> element can be used
31071  
-  instead of the <code>audio</code> element to play the audio,
31072  
-  allowing users to enable the visual alternatives. Chapter titles can
31073  
-  be provided to aid navigation, using the <code>track</code> element
31074  
-  and a
31075  
-<!--END dev-html--><!--END complete--><!--FORK-->
31076  
-  caption file.
31077  
-<!--START dev-html--><!--START complete--><!--END w3c-html--><!--FORK-->
31078  
-  <span>WebVTT file</span>.
31079  
-<!--START w3c-html--><!--FORK-->
31080  
-  And, naturally, transcripts or other textual alternatives can be
31081  
-  provided by simply linking to them in the prose near the
31082  
-  <code>audio</code> element.
31083  
-<!--END w3c-html--><!--FORK-->
31084  
-  <a href="#refsWEBVTT">[WEBVTT]</a>
31085  
-<!--START w3c-html--><!--FORK-->
31086  
-  </p>
  31058
+  <p class="note">In particular, this content is not intended to address accessibility concerns. To
  31059
+  make audio content accessible to the deaf or to those with other physical or cognitive
  31060
+  disabilities, a variety of features are available. If captions or a sign language video are
  31061
+  available, the <code>video</code> element can be used instead of the <code>audio</code> element to
  31062
+  play the audio, allowing users to enable the visual alternatives. Chapter titles can be provided
  31063
+  to aid navigation, using the <code>track</code> element and a <span>WebVTT file</span>. And,
  31064
+  naturally, transcripts or other textual alternatives can be provided by simply linking to them in
  31065
+  the prose near the <code>audio</code> element. <a href="#refsWEBVTT">[WEBVTT]</a></p>
31087 31066
 
31088 31067
   <p>The <code>audio</code> element is a <span>media element</span>
31089 31068
   whose <span>media data</span> is ostensibly audio data.</p>
@@ -39858,6 +39837,7 @@ The Final Minute</pre>
39858 39837
    <li>A <span>WebVTT cue underline span</span>.</li>
39859 39838
    <li>A <span>WebVTT cue ruby span</span>.</li>
39860 39839
    <li>A <span>WebVTT cue voice span</span>.</li>
  39840
+   <li>A <span>WebVTT cue language span</span>.</li>
39861 39841
 
39862 39842
    <li>A <span>WebVTT cue timestamp</span>.</li>
39863 39843
 
@@ -39932,6 +39912,15 @@ The Final Minute</pre>
39932 39912
    <li>A <span>WebVTT cue span end tag</span> "<code title="">v</code>". If this <span>WebVTT cue voice span</span> is the only <span title="WebVTT cue components">component</span> of its <span>WebVTT cue text</span> sequence, then the end tag may be omitted for brevity.</li>
39933 39913
   </ol>
39934 39914
 
  39915
+  <p>A <dfn>WebVTT cue language span</dfn> consists of the following
  39916
+  components, in the order given:</p>
  39917
+
  39918
+  <ol>
  39919
+   <li>A <span>WebVTT cue span start tag</span> "<code title="">lang</code>" that requires an annotation; the annotation represents the language of the following component, and must be a valid BCP 47 language tag. <a href="#refsBCP47">[BCP47]</a></li>
  39920
+   <li><span>WebVTT cue internal text</span>.</li>
  39921
+   <li>A <span>WebVTT cue span end tag</span> "<code title="">lang</code>".</li>
  39922
+  </ol>
  39923
+
39935 39924
 
39936 39925
   <p>A <dfn>WebVTT cue span start tag</dfn> has a <var title="">tag
39937 39926
   name</var> and either <!--allows,--> requires<!--,--> or disallows
@@ -40815,19 +40804,17 @@ The Final Minute</pre>
40815 40804
   Node Object">WebVTT Internal Node Objects</span> and <span
40816 40805
   title="WebVTT Leaf Node Object">WebVTT Leaf Node Objects</span>.</p>
40817 40806
 
40818  
-  <p><dfn title="WebVTT Internal Node Object">WebVTT Internal Node
40819  
-  Objects</dfn> are those that can contain further <span title="WebVTT
40820  
-  Node Object">WebVTT Node Objects</span>. They are conceptually
40821  
-  similar to elements in HTML or the DOM. <span title="WebVTT Internal
40822  
-  Node Object">WebVTT Internal Node Objects</span> have an ordered
40823  
-  list of child <span title="WebVTT Node Object">WebVTT Node
40824  
-  Objects</span>. The <span>WebVTT Internal Node Object</span> is said
40825  
-  to be the <i>parent</i> of the children. Cycles do not occur; the
40826  
-  parent-child relationships so constructed form a tree structure.
40827  
-  <span title="WebVTT Internal Node Object">WebVTT Internal Node
40828  
-  Objects</span> also have an ordered list of class names, know as
40829  
-  their <dfn title="WebVTT Node Object's applicable
40830  
-  classes">applicable classes</dfn>.</p>
  40807
+  <p><dfn title="WebVTT Internal Node Object">WebVTT Internal Node Objects</dfn> are those that can
  40808
+  contain further <span title="WebVTT Node Object">WebVTT Node Objects</span>. They are conceptually
  40809
+  similar to elements in HTML or the DOM. <span title="WebVTT Internal Node Object">WebVTT Internal
  40810
+  Node Objects</span> have an ordered list of child <span title="WebVTT Node Object">WebVTT Node
  40811
+  Objects</span>. The <span>WebVTT Internal Node Object</span> is said to be the <i>parent</i> of
  40812
+  the children. Cycles do not occur; the parent-child relationships so constructed form a tree
  40813
+  structure. <span title="WebVTT Internal Node Object">WebVTT Internal Node Objects</span> also have
  40814
+  an ordered list of class names, known as their <dfn title="WebVTT Node Object's applicable
  40815
+  classes">applicable classes</dfn>, and a language, known as their <dfn title="WebVTT Node Object's
  40816
+  applicable language">applicable language</dfn>, which is to be interpreted as a BCP 47 language
  40817
+  code. <a href="#refsBCP47">[BCP47]</a></p>
40831 40818
 
40832 40819
   <p>There are several concrete classes of <span title="WebVTT
40833 40820
   Internal Node Object">WebVTT Internal Node Objects</span>:</p>
@@ -40887,6 +40874,14 @@ The Final Minute</pre>
40887 40874
     is the name of the voice.</p>
40888 40875
    </dd>
40889 40876
 
  40877
+   <dt><dfn title="WebVTT Language Object">WebVTT Language Objects</dfn></dt>
  40878
+   <dd>
  40879
+    <p>These represent spans of text (a <span>WebVTT cue language span</span>) in <span>WebVTT cue
  40880
+    text</span>, and are used to annotate parts of the cue where the <span title="WebVTT Node
  40881
+    Object's applicable language">applicable language</span> might be different than the surrounding
  40882
+    text's, without implying further meaning (such as italics or bold).</p>
  40883
+   </dd>
  40884
+
40890 40885
   </dl>
40891 40886
 
40892 40887
   <p><dfn title="WebVTT Leaf Node Object">WebVTT Leaf Node
@@ -40934,6 +40929,9 @@ The Final Minute</pre>
40934 40929
    <li><p>Let <var title="">current</var> be the <span>WebVTT Internal
40935 40930
    Node Object</span> <var title="">result</var>.</p></li>
40936 40931
 
  40932
+   <li><p>Let <var title="">language stack</var> be a stack of language codes, initially
  40933
+   empty.</p></li>
  40934
+
40937 40935
    <li><p><i>Loop</i>: If <var title="">position</var> is past the end
40938 40936
    of <var title="">input</var>, return <var title="">result</var> and
40939 40937
    abort these steps.</p></li>
@@ -41023,6 +41021,13 @@ The Final Minute</pre>
41023 41021
         string if there is no annotation string.</p>
41024 41022
        </dd>
41025 41023
 
  41024
+       <dt>If the tag name is "<code title="">lang</code>"</dt>
  41025
+       <dd>
  41026
+        <p>Push the value of the token's annotation string, or the empty string if there is no
  41027
+        annotation string, onto the <var title="">language stack</var>; then <span title="attach a
  41028
+        WebVTT Internal Node Object">attach</span> a <span>WebVTT Language Object</span>.</p>
  41029
+       </dd>
  41030
+
41026 41031
        <dt>Otherwise</dt>
41027 41032
        <dd>
41028 41033
         <p>Ignore the token.</p>
@@ -41044,6 +41049,10 @@ The Final Minute</pre>
41044 41049
        list of classes in the token, excluding any classes that are
41045 41050
        the empty string.</p>
41046 41051
 
  41052
+       <li><p>Set the new object's <span title="WebVTT Node Object's applicable language">applicable
  41053
+       language</span> to the top entry on the <var title="">language stack</var>, if the stack is
  41054
+       not empty.</p>
  41055
+
41047 41056
        <li><p>Append the newly created node object to <var
41048 41057
        title="">current</var>.</p></li>
41049 41058
 
@@ -41093,6 +41102,11 @@ The Final Minute</pre>
41093 41102
 
41094 41103
       </ul>
41095 41104
 
  41105
+      <p>Otherwise, if the tag name of the end tag token <var title="">token</var> is "<code
  41106
+      title="">lang</code>" and <var title="">current</var> is a <span>WebVTT Language
  41107
+      Object</span>, then let <var title="">current</var> be the parent node of <var
  41108
+      title="">current</var>, and pop the top value from the <var title="">language stack</var>.</p>
  41109
+
41096 41110
       <p>Otherwise, if the tag name of the end tag token <var
41097 41111
       title="">token</var> is "<code title="">ruby</code>" and <var
41098 41112
       title="">current</var> is a <span>WebVTT Ruby Text
@@ -41654,7 +41668,10 @@ The Final Minute</pre>
41654 41668
      <td><code>HTMLElement</code> element node with <code title="dom-Node-localName">localName</code> "<code>rt</code>".
41655 41669
     <tr>
41656 41670
      <td><span>WebVTT Voice Object</span>
41657  
-     <td><code>HTMLElement</code> element node with <code title="dom-Node-localName">localName</code> "<code>span</code>", a <code title="attr-title">title</code> attribute set to the <span>WebVTT Voice Object</span>'s value.
  41671
+     <td><code>HTMLElement</code> element node with <code title="dom-Node-localName">localName</code> "<code>span</code>", and a <code title="attr-title">title</code> attribute set to the <span>WebVTT Voice Object</span>'s value.
  41672
+    <tr>
  41673
+     <td><span>WebVTT Class Object</span>
  41674
+     <td><code>HTMLElement</code> element node with <code title="dom-Node-localName">localName</code> "<code>span</code>", and a <code title="attr-lang">lang</code> attribute set to the <span>WebVTT Language Object</span>'s <span title="WebVTT Node Object's applicable language">applicable language</span>.
41658 41675
     <tr>
41659 41676
      <td><span>WebVTT Text Object</span>
41660 41677
      <td><code>Text</code> node whose character data is the value of the <span>WebVTT Text Object</span>.
@@ -41663,14 +41680,12 @@ The Final Minute</pre>
41663 41680
      <td><code>ProcessingInstruction</code> node whose <code title="dom-ProcessingInstruction-target">target</code> is "<code title="">timestamp</code>" and whose <code title="dom-ProcessingInstruction-data">data</code> is a <span>WebVTT timestamp</span> representing the value of the <span>WebVTT Timestamp Object</span>, with all optional components included, with one leading zero if the <var title="">hours</var> component is less than ten, and with no leading zeros otherwise.
41664 41681
   </table>
41665 41682
 
41666  
-  <p><code>HTMLElement</code> nodes created as part of the mapping
41667  
-  described above must have their <code
41668  
-  title="dom-Node-namespaceURI">namespaceURI</code> set to the
41669  
-  <span>HTML namespace</span>, and, if any classes apply to the
41670  
-  corresponding <span>WebVTT Internal Node Object</span>, must have a
41671  
-  <code title="attr-class">class</code> attribute set to the string
41672  
-  obtained by concatenating all those classes, each separated from the
41673  
-  next by a single U+0020 SPACE character.</p>
  41683
+  <p><code>HTMLElement</code> nodes created as part of the mapping described above must have their
  41684
+  <code title="dom-Node-namespaceURI">namespaceURI</code> set to the <span>HTML namespace</span>,
  41685
+  and, if the corresponding <span>WebVTT Internal Node Object</span> has any <span title="WebVTT
  41686
+  Node Object's applicable classes">applicable classes</span>, must have a <code
  41687
+  title="attr-class">class</code> attribute set to the string obtained by concatenating all those
  41688
+  classes, each separated from the next by a single U+0020 SPACE character.</p>
41674 41689
 
41675 41690
   <p>The <code title="dom-Node-ownerDocument">ownerDocument</code>
41676 41691
   attribute of all nodes in the DOM tree must be set to the given
@@ -114004,6 +114019,10 @@ iframe[seamless] { display: block; }
114004 114019
        <td><code title="">v</code>
114005 114020
 
114006 114021
       <tr>
  114022
+       <td><span title="WebVTT Language Object">WebVTT Language Objects</span>
  114023
+       <td><code title="">lang</code>
  114024
+
  114025
+      <tr>
114007 114026
        <td>Other elements (specifically, <span title="List of WebVTT Node Objects">Lists of WebVTT Node Objects</span>)
114008 114027
        <td>No explicit name.
114009 114028
 
@@ -114016,13 +114035,13 @@ iframe[seamless] { display: block; }
114016 114035
    Objects</span> are considered as being in the namespace expressed
114017 114036
    as the empty string.</p></li>
114018 114037
 
114019  
-   <li><p>For the purposes of attribute selector matching, <span
114020  
-   title="WebVTT Internal Node Object">WebVTT Internal Node
114021  
-   Objects</span> have no attributes, except for <span
114022  
-   title="WebVTT Voice Object">WebVTT Voice Objects</span>, which
114023  
-   have a single attribute named "<code title="">voice</code>"
114024  
-   whose value is the value of the <span>WebVTT Voice
114025  
-   Object</span>.</p></li>
  114038
+   <li><p>For the purposes of attribute selector matching, <span title="WebVTT Internal Node
  114039
+   Object">WebVTT Internal Node Objects</span> have no attributes, except for <span title="WebVTT
  114040
+   Voice Object">WebVTT Voice Objects</span>, which have a single attribute named "<code
  114041
+   title="">voice</code>" whose value is the value of the <span>WebVTT Voice Object</span>, and
  114042
+   <span title="WebVTT Language Object">WebVTT Language Objects</span>, which have a single
  114043
+   attribute named "<code title="">lang</code>" whose value is the object's <span title="WebVTT Node
  114044
+   Object's applicable language">applicable language</span.</p></li>
114026 114045
 
114027 114046
    <li><p>For the purposes of class selector matching, <span
114028 114047
    title="WebVTT Internal Node Object">WebVTT Internal Node
@@ -114031,6 +114050,10 @@ iframe[seamless] { display: block; }
114031 114050
    isn't especially well-defined, but the Selectors spec doesn't
114032 114051
    really give one much to go on here. -->
114033 114052
 
  114053
+   <li><p>For the purposes of the <code title="selector-lang">:lang()</code> pseudo-class, <span
  114054
+   title="WebVTT Internal Node Object">WebVTT Internal Node Objects</span> have the language
  114055
+   described as the <span>WebVTT Node Object's applicable language</span>.</p></li>
  114056
+
114034 114057
    <li><p>For the purposes of ID selector matching, <span title="List
114035 114058
    of WebVTT Node Objects">Lists of WebVTT Node Objects</span> have
114036 114059
    the ID given by the cue's <span>text track cue identifier</span>,

0 notes on commit a0cffd9

Please sign in to comment.
Something went wrong with that request. Please try again.