<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[204361] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/204361">204361</a></dd>
<dt>Author</dt> <dd>n_wang@apple.com</dd>
<dt>Date</dt> <dd>2016-08-10 16:30:24 -0700 (Wed, 10 Aug 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>AX: Media controls timeline should have percentage value description
https://bugs.webkit.org/show_bug.cgi?id=160619

Reviewed by Eric Carlson.

Source/WebCore:

Added aria-valuetext attribute to the timeline slider and set its value to
the percentage format. Also formatted the elapsed/remaining timer's description
so that it's more human readable.

Test: http/tests/media/hls/video-duration-accessibility.html

* English.lproj/mediaControlsLocalizedStrings.js:
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.drawVolumeBackground):
(Controller.prototype.formatTimeDescription):
(Controller.prototype.formatTime):
(Controller.prototype.updateTime):
(Controller.prototype.updateControlsWhileScrubbing):

LayoutTests:

* http/tests/media/hls/video-duration-accessibility-expected.txt: Added.
* http/tests/media/hls/video-duration-accessibility.html: Added.
* http/tests/media/resources/hls/generate-vod.php: Added.
* media/media-controls-accessibility-expected.txt:
* platform/efl/accessibility/media-element-expected.txt:
* platform/gtk/accessibility/media-element-expected.txt:
* platform/mac/accessibility/media-element-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsmediamediacontrolsaccessibilityexpectedtxt">trunk/LayoutTests/media/media-controls-accessibility-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformeflaccessibilitymediaelementexpectedtxt">trunk/LayoutTests/platform/efl/accessibility/media-element-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkaccessibilitymediaelementexpectedtxt">trunk/LayoutTests/platform/gtk/accessibility/media-element-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilitymediaelementexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/media-element-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreEnglishlprojmediaControlsLocalizedStringsjs">trunk/Source/WebCore/English.lproj/mediaControlsLocalizedStrings.js</a></li>
<li><a href="#trunkSourceWebCoreModulesmediacontrolsmediaControlsApplejs">trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestshttptestsmediahlsvideodurationaccessibilityexpectedtxt">trunk/LayoutTests/http/tests/media/hls/video-duration-accessibility-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsmediahlsvideodurationaccessibilityhtml">trunk/LayoutTests/http/tests/media/hls/video-duration-accessibility.html</a></li>
<li><a href="#trunkLayoutTestshttptestsmediaresourceshlsgeneratevodphp">trunk/LayoutTests/http/tests/media/resources/hls/generate-vod.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (204360 => 204361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-08-10 23:19:49 UTC (rev 204360)
+++ trunk/LayoutTests/ChangeLog        2016-08-10 23:30:24 UTC (rev 204361)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2016-08-10  Nan Wang  &lt;n_wang@apple.com&gt;
+
+        AX: Media controls timeline should have percentage value description
+        https://bugs.webkit.org/show_bug.cgi?id=160619
+
+        Reviewed by Eric Carlson.
+
+        * http/tests/media/hls/video-duration-accessibility-expected.txt: Added.
+        * http/tests/media/hls/video-duration-accessibility.html: Added.
+        * http/tests/media/resources/hls/generate-vod.php: Added.
+        * media/media-controls-accessibility-expected.txt:
+        * platform/efl/accessibility/media-element-expected.txt:
+        * platform/gtk/accessibility/media-element-expected.txt:
+        * platform/mac/accessibility/media-element-expected.txt:
+
</ins><span class="cx"> 2016-08-09  Skachkov Oleksandr  &lt;gskachkov@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [ES2016] Implement Object.values
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsmediahlsvideodurationaccessibilityexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/media/hls/video-duration-accessibility-expected.txt (0 => 204361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/media/hls/video-duration-accessibility-expected.txt                                (rev 0)
+++ trunk/LayoutTests/http/tests/media/hls/video-duration-accessibility-expected.txt        2016-08-10 23:30:24 UTC (rev 204361)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+
+EVENT(canplaythrough)
+EVENT(play)
+EXPECTED (video.duration != Infinity == 'true') OK
+EVENT(seeked)
+EXPECTED (elapsedTimer.description.indexOf('1 Second') !== -1 == 'true') OK
+EVENT(seeked)
+EXPECTED (elapsedTimer.description.indexOf('2 Seconds') !== -1 == 'true') OK
+EVENT(seeked)
+EXPECTED (elapsedTimer.description.indexOf('1 Minute') !== -1 == 'true') OK
+EVENT(seeked)
+EXPECTED (elapsedTimer.description.indexOf('2 Minutes') !== -1 == 'true') OK
+EVENT(seeked)
+EXPECTED (elapsedTimer.description.indexOf('1 Hour') !== -1 == 'true') OK
+EVENT(seeked)
+EXPECTED (elapsedTimer.description.indexOf('2 Hours') !== -1 == 'true') OK
+END OF TEST
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsmediahlsvideodurationaccessibilityhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/media/hls/video-duration-accessibility.html (0 => 204361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/media/hls/video-duration-accessibility.html                                (rev 0)
+++ trunk/LayoutTests/http/tests/media/hls/video-duration-accessibility.html        2016-08-10 23:30:24 UTC (rev 204361)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+    &lt;head&gt;
+        &lt;script src=../../media-resources/video-test.js&gt;&lt;/script&gt;
+        &lt;script src=../../media-resources/media-controls.js&gt;&lt;/script&gt;
+        &lt;script&gt;
+        if (window.accessibilityController) {
+            var controls;
+            var elapsedTimer, videoElement;
+            var seekTimes = [1, 2, 70, 130, 3670, 7300];
+            var seekCount = 0;
+            
+            function start() {
+                video = document.getElementById('video');
+                waitForEventOnce('canplaythrough', function() { video.play(); });
+                waitForEventOnce('play', playing);
+                waitForEventAndFail('stalled');
+                waitForEvent('seeked', seek);
+                video.src = &quot;../resources/hls/generate-vod.php?duration=8000&quot;;
+            }
+
+            function playing() {
+                video.pause();
+                setTimeout(function() {
+                    testExpected('video.duration != Infinity', true);
+                    video.fastSeek(seekTimes[0]);
+                }, 200);
+            }
+            
+            function seek() {
+                seekCount++;
+                videoElement = accessibilityController.accessibleElementById(&quot;video&quot;);
+                elapsedTimer = videoElement.childAtIndex(0).childAtIndex(3);
+                
+                if (elapsedTimer.description.indexOf(&quot;Hours&quot;) !== -1)
+                    testExpected(&quot;elapsedTimer.description.indexOf('2 Hours') !== -1&quot;, true);
+                else if (elapsedTimer.description.indexOf(&quot;Hour&quot;) !== -1)
+                    testExpected(&quot;elapsedTimer.description.indexOf('1 Hour') !== -1&quot;, true);
+                else if (elapsedTimer.description.indexOf(&quot;Minutes&quot;) !== -1)
+                    testExpected(&quot;elapsedTimer.description.indexOf('2 Minutes') !== -1&quot;, true);
+                else if (elapsedTimer.description.indexOf(&quot;Minute&quot;) !== -1)
+                    testExpected(&quot;elapsedTimer.description.indexOf('1 Minute') !== -1&quot;, true);
+                else if (elapsedTimer.description.indexOf(&quot;Seconds&quot;) !== -1)
+                    testExpected(&quot;elapsedTimer.description.indexOf('2 Seconds') !== -1&quot;, true);
+                else if (elapsedTimer.description.indexOf(&quot;Second&quot;) !== -1)
+                    testExpected(&quot;elapsedTimer.description.indexOf('1 Second') !== -1&quot;, true);
+                
+                if (seekCount == seekTimes.length)
+                    endTest();
+                else
+                    video.fastSeek(seekTimes[seekCount]);
+            }
+        }
+        &lt;/script&gt;
+    &lt;/head&gt;
+    &lt;body onload=&quot;start()&quot;&gt;
+        &lt;video width=&quot;640&quot; id=&quot;video&quot; controls&gt;&lt;/video&gt;
+    &lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsmediaresourceshlsgeneratevodphp"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/media/resources/hls/generate-vod.php (0 => 204361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/media/resources/hls/generate-vod.php                                (rev 0)
+++ trunk/LayoutTests/http/tests/media/resources/hls/generate-vod.php        2016-08-10 23:30:24 UTC (rev 204361)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+&lt;?php
+# See the HLS ITEF spec: &lt;http://tools.ietf.org/id/draft-pantos-http-live-streaming-12.txt&gt;
+header(&quot;Status: 200 OK&quot;);
+header(&quot;HTTP/1.1 200 OK&quot;);
+header(&quot;Connection: close&quot;);
+header(&quot;Last-Modified: &quot; . gmdate(&quot;D, d M Y H:i:s&quot;) . &quot; GMT&quot;);
+header(&quot;Pragma: no-cache&quot;);
+header(&quot;Etag: &quot; . '&quot;' . filesize(__FILE__) . &quot;-&quot; . filemtime(__FILE__) . '&quot;');
+header(&quot;Content-Type: application/x-mpegurl&quot;);
+
+$chunkDuration = 6.0272;
+$chunkCount = 5;
+if (array_key_exists(&quot;duration&quot;, $_GET)) 
+    $chunkCount = intval($_GET[&quot;duration&quot;] / $chunkDuration);
+
+function println($string) { return print($string . PHP_EOL); }
+println(&quot;#EXTM3U&quot;);
+println(&quot;#EXT-X-TARGETDURATION:7&quot;);
+println(&quot;#EXT-X-VERSION:4&quot;);
+println(&quot;#EXT-X-MEDIA-SEQUENCE:0&quot;);
+println(&quot;#EXT-X-PLAYLIST-TYPE:VOD&quot;);
+
+for ($i = 0; $i &lt; $chunkCount; ++$i) {
+    println(&quot;#EXTINF:&quot; . $chunkDuration . &quot;,&quot;);
+    println(&quot;test.ts&quot;);
+}
+
+println(&quot;#EXT-X-ENDLIST&quot;);
</ins></span></pre></div>
<a id="trunkLayoutTestsmediamediacontrolsaccessibilityexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-controls-accessibility-expected.txt (204360 => 204361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-controls-accessibility-expected.txt        2016-08-10 23:19:49 UTC (rev 204360)
+++ trunk/LayoutTests/media/media-controls-accessibility-expected.txt        2016-08-10 23:30:24 UTC (rev 204361)
</span><span class="lines">@@ -7,8 +7,8 @@
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span><del>-elapsedTimer.description: AXDescription: Elapsed 00:00
-remainingTimer.description: AXDescription: Remaining -00:06
</del><ins>+elapsedTimer.description: AXDescription: Elapsed 0 Seconds
+remainingTimer.description: AXDescription: Remaining 6 Seconds
</ins><span class="cx"> 
</span><span class="cx"> muteButton.description: AXDescription: Mute
</span><span class="cx"> muteButton.role: AXRole: AXCheckBox
</span></span></pre></div>
<a id="trunkLayoutTestsplatformeflaccessibilitymediaelementexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/efl/accessibility/media-element-expected.txt (204360 => 204361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/efl/accessibility/media-element-expected.txt        2016-08-10 23:19:49 UTC (rev 204360)
+++ trunk/LayoutTests/platform/efl/accessibility/media-element-expected.txt        2016-08-10 23:30:24 UTC (rev 204361)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx">             role: AXRole: AXButton
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-            title: AXTitle: Elapsed 00:00
</del><ins>+            title: AXTitle: Elapsed 0 Seconds
</ins><span class="cx">             role: AXRole: AXTimer
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx">             role: AXRole: AXSlider
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-            title: AXTitle: Remaining -00:06
</del><ins>+            title: AXTitle: Remaining 6 Seconds
</ins><span class="cx">             role: AXRole: AXTimer
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkaccessibilitymediaelementexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/accessibility/media-element-expected.txt (204360 => 204361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/accessibility/media-element-expected.txt        2016-08-10 23:19:49 UTC (rev 204360)
+++ trunk/LayoutTests/platform/gtk/accessibility/media-element-expected.txt        2016-08-10 23:30:24 UTC (rev 204361)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx">             role: AXRole: AXSlider
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-            title: AXTitle: Remaining -00:06
</del><ins>+            title: AXTitle: Remaining 6 Seconds
</ins><span class="cx">             role: AXRole: AXTimer
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilitymediaelementexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/accessibility/media-element-expected.txt (204360 => 204361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/media-element-expected.txt        2016-08-10 23:19:49 UTC (rev 204360)
+++ trunk/LayoutTests/platform/mac/accessibility/media-element-expected.txt        2016-08-10 23:30:24 UTC (rev 204361)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx">             role: AXRole: AXButton
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-            description: AXDescription: Elapsed 00:00
</del><ins>+            description: AXDescription: Elapsed 0 Seconds
</ins><span class="cx">             role: AXRole: AXGroup
</span><span class="cx">             subrole: AXSubrole: AXApplicationTimer
</span><span class="cx"> 
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx">                 role: AXRole: AXValueIndicator
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-            description: AXDescription: Remaining -00:06
</del><ins>+            description: AXDescription: Remaining 6 Seconds
</ins><span class="cx">             role: AXRole: AXGroup
</span><span class="cx">             subrole: AXSubrole: AXApplicationTimer
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (204360 => 204361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-08-10 23:19:49 UTC (rev 204360)
+++ trunk/Source/WebCore/ChangeLog        2016-08-10 23:30:24 UTC (rev 204361)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2016-08-10  Nan Wang  &lt;n_wang@apple.com&gt;
+
+        AX: Media controls timeline should have percentage value description
+        https://bugs.webkit.org/show_bug.cgi?id=160619
+
+        Reviewed by Eric Carlson.
+
+        Added aria-valuetext attribute to the timeline slider and set its value to
+        the percentage format. Also formatted the elapsed/remaining timer's description
+        so that it's more human readable.
+
+        Test: http/tests/media/hls/video-duration-accessibility.html
+
+        * English.lproj/mediaControlsLocalizedStrings.js:
+        * Modules/mediacontrols/mediaControlsApple.js:
+        (Controller.prototype.drawVolumeBackground):
+        (Controller.prototype.formatTimeDescription):
+        (Controller.prototype.formatTime):
+        (Controller.prototype.updateTime):
+        (Controller.prototype.updateControlsWhileScrubbing):
+
</ins><span class="cx"> 2016-08-10  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Revert back to the old style member function state machine for callbacks
</span></span></pre></div>
<a id="trunkSourceWebCoreEnglishlprojmediaControlsLocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/English.lproj/mediaControlsLocalizedStrings.js (204360 => 204361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/English.lproj/mediaControlsLocalizedStrings.js        2016-08-10 23:19:49 UTC (rev 204360)
+++ trunk/Source/WebCore/English.lproj/mediaControlsLocalizedStrings.js        2016-08-10 23:30:24 UTC (rev 204361)
</span><span class="lines">@@ -17,10 +17,14 @@
</span><span class="cx">     'Error': 'Error',
</span><span class="cx">     'Exit Full Screen': 'Exit Full Screen',
</span><span class="cx">     'Fast Forward': 'Fast Forward',
</span><ins>+    'Hour' : 'Hour',
+    'Hours': 'Hours',
</ins><span class="cx">     'Live Broadcast': 'Live Broadcast',
</span><span class="cx">     'Loading': 'Loading',
</span><span class="cx">     'Maximum Volume': 'Maximum Volume',
</span><span class="cx">     'Minimum Volume': 'Minimum Volume',
</span><ins>+    'Minute': 'Minute',
+    'Minutes': 'Minutes',
</ins><span class="cx">     'Mute': 'Mute',
</span><span class="cx">     'Pause': 'Pause',
</span><span class="cx">     'Play': 'Play',
</span><span class="lines">@@ -27,6 +31,8 @@
</span><span class="cx">     'Remaining': 'Remaining',
</span><span class="cx">     'Rewind': 'Rewind',
</span><span class="cx">     'Rewind ##sec## Seconds': 'Rewind ##sec## Seconds',
</span><ins>+    'Second': 'Second',
+    'Seconds': 'Seconds',
</ins><span class="cx">     'Show Controls': 'Show Controls',
</span><span class="cx">     'Stalled': 'Stalled',
</span><span class="cx">     'Start Playback': 'Start Playback',
</span><span class="lines">@@ -38,4 +44,4 @@
</span><span class="cx">     'Video Playback Placeholder': 'Video Playback Placeholder',
</span><span class="cx">     'Volume': 'Volume',
</span><span class="cx">     'Waiting': 'Waiting'
</span><del>-};
</del><span class="cx">\ No newline at end of file
</span><ins>+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmediacontrolsmediaControlsApplejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (204360 => 204361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js        2016-08-10 23:19:49 UTC (rev 204360)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js        2016-08-10 23:30:24 UTC (rev 204361)
</span><span class="lines">@@ -1568,6 +1568,25 @@
</span><span class="cx"> 
</span><span class="cx">         ctx.restore();
</span><span class="cx">     },
</span><ins>+    
+    formatTimeDescription: function(time)
+    {
+        if (isNaN(time))
+            time = 0;
+        var absTime = Math.abs(time);
+        var intSeconds = Math.floor(absTime % 60).toFixed(0);
+        var intMinutes = Math.floor((absTime / 60) % 60).toFixed(0);
+        var intHours = Math.floor(absTime / (60 * 60)).toFixed(0);
+        
+        var secondString = intSeconds == 1 ? 'Second' : 'Seconds';
+        var minuteString = intMinutes == 1 ? 'Minute' : 'Minutes';
+        var hourString = intHours == 1 ? 'Hour' : 'Hours';
+        if (intHours &gt; 0)
+            return `${intHours} ${this.UIString(hourString)}, ${intMinutes} ${this.UIString(minuteString)}, ${intSeconds} ${this.UIString(secondString)}`;
+        if (intMinutes &gt; 0)
+            return `${intMinutes} ${this.UIString(minuteString)}, ${intSeconds} ${this.UIString(secondString)}`;
+        return `${intSeconds} ${this.UIString(secondString)}`;
+    },
</ins><span class="cx"> 
</span><span class="cx">     formatTime: function(time)
</span><span class="cx">     {
</span><span class="lines">@@ -1769,10 +1788,15 @@
</span><span class="cx">         var currentTime = this.video.currentTime;
</span><span class="cx">         var timeRemaining = currentTime - this.video.duration;
</span><span class="cx">         this.currentTimeClone.innerText = this.controls.currentTime.innerText = this.formatTime(currentTime);
</span><del>-        this.controls.currentTime.setAttribute('aria-label', `${this.UIString('Elapsed')} ${this.formatTime(currentTime)}`);
</del><ins>+        this.controls.currentTime.setAttribute('aria-label', `${this.UIString('Elapsed')} ${this.formatTimeDescription(currentTime)}`);
</ins><span class="cx">         this.controls.timeline.value = this.video.currentTime;
</span><span class="cx">         this.remainingTimeClone.innerText = this.controls.remainingTime.innerText = this.formatTime(timeRemaining);
</span><del>-        this.controls.remainingTime.setAttribute('aria-label', `${this.UIString('Remaining')} ${this.formatTime(timeRemaining)}`);
</del><ins>+        this.controls.remainingTime.setAttribute('aria-label', `${this.UIString('Remaining')} ${this.formatTimeDescription(timeRemaining)}`);
+        
+        // Mark the timeline value in percentage format in accessibility.
+        var timeElapsedPercent = currentTime / this.video.duration;
+        timeElapsedPercent = Math.max(Math.min(1, timeElapsedPercent), 0);
+        this.controls.timeline.setAttribute('aria-valuetext', `${parseInt(timeElapsedPercent * 100)}%`);
</ins><span class="cx">     },
</span><span class="cx">     
</span><span class="cx">     updateControlsWhileScrubbing: function()
</span></span></pre>
</div>
</div>

</body>
</html>