<!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>[158713] 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/158713">158713</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2013-11-05 19:50:51 -0800 (Tue, 05 Nov 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>AX: media controls accessibility needs more work
https://bugs.webkit.org/show_bug.cgi?id=123749

Patch by James Craig &lt;jcraig@apple.com&gt; on 2013-11-05
Reviewed by Jer Noble.

Updated some of the control labels/roles to improve accessibility.
  - Volume slider is now keyboard/screenreader accessible.
  - muteButton was a checkbox toggling checked state, now a button that toggles label &quot;mute/unmute&quot;
  - fullscreenButton was a checkbox toggling checked state, now a button that toggles label &quot;display/exit full screen&quot;
  - captionButton was a checkbox, now a popup button that launches the newly accessible menu.
Subtitles menu is now keyboard/screenreader accessible (uses roaming tabindex).
Render dump expectations changed because volume slider is now hidden via...
...opacity/size (to make accessible without hover) instead of display:none.

Updated existing test coverage.

Source/WebCore:

* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-panel .volume-box):
(audio::-webkit-media-controls-panel .volume-box:active):
(audio::-webkit-media-controls-toggle-closed-captions-button):
(audio::-webkit-media-controls-closed-captions-container .list):
(audio::-webkit-media-controls-closed-captions-container li:focus):
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.createControls):
(Controller.prototype.handleFullscreenChange):
(Controller.prototype.handleMuteButtonClicked):
(Controller.prototype.handleMinButtonClicked):
(Controller.prototype.handleMaxButtonClicked):
(Controller.prototype.handleVolumeSliderChange):
(Controller.prototype.buildCaptionMenu):
(Controller.prototype.focusSiblingCaptionItem):
(Controller.prototype.handleCaptionItemKeyUp):

LayoutTests:

* platform/mac/accessibility/media-element-expected.txt:
* platform/mac/media/audio-controls-rendering-expected.txt:
* platform/mac/media/controls-after-reload-expected.txt:
* platform/mac/media/controls-strict-expected.txt:
* platform/mac/media/controls-styling-strict-expected.txt:
* platform/mac/media/controls-without-preload-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilitymediaelementexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/media-element-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacmediaaudiocontrolsrenderingexpectedtxt">trunk/LayoutTests/platform/mac/media/audio-controls-rendering-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacmediacontrolsafterreloadexpectedtxt">trunk/LayoutTests/platform/mac/media/controls-after-reload-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacmediacontrolsstrictexpectedtxt">trunk/LayoutTests/platform/mac/media/controls-strict-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacmediacontrolsstylingstrictexpectedtxt">trunk/LayoutTests/platform/mac/media/controls-styling-strict-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacmediacontrolswithoutpreloadexpectedtxt">trunk/LayoutTests/platform/mac/media/controls-without-preload-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmediacontrolsmediaControlsApplecss">trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css</a></li>
<li><a href="#trunkSourceWebCoreModulesmediacontrolsmediaControlsApplejs">trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (158712 => 158713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2013-11-06 03:36:32 UTC (rev 158712)
+++ trunk/LayoutTests/ChangeLog        2013-11-06 03:50:51 UTC (rev 158713)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2013-11-05  James Craig  &lt;jcraig@apple.com&gt;
+
+        AX: media controls accessibility needs more work
+        https://bugs.webkit.org/show_bug.cgi?id=123749
+
+        Reviewed by Jer Noble.
+
+        Updated some of the control labels/roles to improve accessibility.
+          - Volume slider is now keyboard/screenreader accessible.
+          - muteButton was a checkbox toggling checked state, now a button that toggles label &quot;mute/unmute&quot;
+          - fullscreenButton was a checkbox toggling checked state, now a button that toggles label &quot;display/exit full screen&quot;
+          - captionButton was a checkbox, now a popup button that launches the newly accessible menu.
+        Subtitles menu is now keyboard/screenreader accessible (uses roaming tabindex).
+        Render dump expectations changed because volume slider is now hidden via... 
+        ...opacity/size (to make accessible without hover) instead of display:none.
+
+        Updated existing test coverage.
+
+        * platform/mac/accessibility/media-element-expected.txt:
+        * platform/mac/media/audio-controls-rendering-expected.txt:
+        * platform/mac/media/controls-after-reload-expected.txt:
+        * platform/mac/media/controls-strict-expected.txt:
+        * platform/mac/media/controls-styling-strict-expected.txt:
+        * platform/mac/media/controls-without-preload-expected.txt:
+
</ins><span class="cx"> 2013-11-05  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Add a test to obtain offsetWidth of expanded table cell
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilitymediaelementexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/accessibility/media-element-expected.txt (158712 => 158713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/media-element-expected.txt        2013-11-06 03:36:32 UTC (rev 158712)
+++ trunk/LayoutTests/platform/mac/accessibility/media-element-expected.txt        2013-11-06 03:50:51 UTC (rev 158713)
</span><span class="lines">@@ -54,12 +54,20 @@
</span><span class="cx">                     role: AXRole: AXStaticText
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+            description: AXDescription: Volume
+            role: AXRole: AXSlider
+
+
+                description: AXDescription: 
+                role: AXRole: AXValueIndicator
+
+
</ins><span class="cx">             description: AXDescription: Mute
</span><del>-            role: AXRole: AXCheckBox
</del><ins>+            role: AXRole: AXButton
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">             description: AXDescription: Display Full Screen
</span><del>-            role: AXRole: AXCheckBox
</del><ins>+            role: AXRole: AXButton
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacmediaaudiocontrolsrenderingexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/media/audio-controls-rendering-expected.txt (158712 => 158713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/media/audio-controls-rendering-expected.txt        2013-11-06 03:36:32 UTC (rev 158712)
+++ trunk/LayoutTests/platform/mac/media/audio-controls-rendering-expected.txt        2013-11-06 03:50:51 UTC (rev 158713)
</span><span class="lines">@@ -43,6 +43,13 @@
</span><span class="cx">   RenderBlock {DIV} at (0,0) size 6x6 [bgcolor=#FFFFFF]
</span><span class="cx"> layer at (184,44) size 22x22
</span><span class="cx">   RenderFlexibleBox {DIV} at (176,2) size 22x22
</span><ins>+layer at (184,44) size 2x22
+  RenderFlexibleBox {DIV} at (0,0) size 2x22 [border: (1px solid #000000F3)]
+    RenderSlider {INPUT} at (-7,6) size 2x10 [color=#909090] [border: (1px solid #000000DF)]
+      RenderFlexibleBox {DIV} at (1,1) size 0x8
+        RenderBlock {DIV} at (0,0) size 0x8
+layer at (170,51) size 8x8
+  RenderBlock {DIV} at (-8,0) size 8x8
</ins><span class="cx"> layer at (187,47) size 16x16
</span><span class="cx">   RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
</span><span class="cx"> layer at (8,85) size 320x25
</span><span class="lines">@@ -74,6 +81,13 @@
</span><span class="cx">   RenderBlock {DIV} at (0,0) size 6x6 [bgcolor=#FFFFFF]
</span><span class="cx"> layer at (304,87) size 22x22
</span><span class="cx">   RenderFlexibleBox {DIV} at (296,2) size 22x22
</span><ins>+layer at (304,87) size 2x22
+  RenderFlexibleBox {DIV} at (0,0) size 2x22 [border: (1px solid #000000F3)]
+    RenderSlider {INPUT} at (-7,6) size 2x10 [color=#909090] [border: (1px solid #000000DF)]
+      RenderFlexibleBox {DIV} at (1,1) size 0x8
+        RenderBlock {DIV} at (0,0) size 0x8
+layer at (290,94) size 8x8
+  RenderBlock {DIV} at (-8,0) size 8x8
</ins><span class="cx"> layer at (307,90) size 16x16
</span><span class="cx">   RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
</span><span class="cx"> layer at (8,128) size 320x100
</span><span class="lines">@@ -107,5 +121,12 @@
</span><span class="cx">   RenderBlock {DIV} at (0,0) size 6x6 [bgcolor=#FFFFFF]
</span><span class="cx"> layer at (304,205) size 22x22
</span><span class="cx">   RenderFlexibleBox {DIV} at (296,2) size 22x22
</span><ins>+layer at (304,205) size 2x22
+  RenderFlexibleBox {DIV} at (0,0) size 2x22 [border: (1px solid #000000F3)]
+    RenderSlider {INPUT} at (-7,6) size 2x10 [color=#909090] [border: (1px solid #000000DF)]
+      RenderFlexibleBox {DIV} at (1,1) size 0x8
+        RenderBlock {DIV} at (0,0) size 0x8
+layer at (290,212) size 8x8
+  RenderBlock {DIV} at (-8,0) size 8x8
</ins><span class="cx"> layer at (307,208) size 16x16
</span><span class="cx">   RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacmediacontrolsafterreloadexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/media/controls-after-reload-expected.txt (158712 => 158713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/media/controls-after-reload-expected.txt        2013-11-06 03:36:32 UTC (rev 158712)
+++ trunk/LayoutTests/platform/mac/media/controls-after-reload-expected.txt        2013-11-06 03:50:51 UTC (rev 158713)
</span><span class="lines">@@ -39,6 +39,13 @@
</span><span class="cx">   RenderBlock {DIV} at (0,0) size 6x6 [bgcolor=#FFFFFF]
</span><span class="cx"> layer at (274,259) size 22x22
</span><span class="cx">   RenderFlexibleBox {DIV} at (266,2) size 22x22
</span><ins>+layer at (274,259) size 2x22
+  RenderFlexibleBox {DIV} at (0,0) size 2x22 [border: (1px solid #000000F3)]
+    RenderSlider {INPUT} at (-7,6) size 2x10 [color=#909090] [border: (1px solid #000000DF)]
+      RenderFlexibleBox {DIV} at (1,1) size 0x8
+        RenderBlock {DIV} at (0,0) size 0x8
+layer at (260,266) size 8x8
+  RenderBlock {DIV} at (-8,0) size 8x8
</ins><span class="cx"> layer at (277,262) size 16x16
</span><span class="cx">   RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
</span><span class="cx"> layer at (305,262) size 16x16
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacmediacontrolsstrictexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/media/controls-strict-expected.txt (158712 => 158713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/media/controls-strict-expected.txt        2013-11-06 03:36:32 UTC (rev 158712)
+++ trunk/LayoutTests/platform/mac/media/controls-strict-expected.txt        2013-11-06 03:50:51 UTC (rev 158713)
</span><span class="lines">@@ -39,6 +39,13 @@
</span><span class="cx">   RenderBlock {DIV} at (0,0) size 6x6 [bgcolor=#FFFFFF]
</span><span class="cx"> layer at (274,267) size 22x22
</span><span class="cx">   RenderFlexibleBox {DIV} at (266,2) size 22x22
</span><ins>+layer at (274,267) size 2x22
+  RenderFlexibleBox {DIV} at (0,0) size 2x22 [border: (1px solid #000000F3)]
+    RenderSlider {INPUT} at (-7,6) size 2x10 [color=#909090] [border: (1px solid #000000DF)]
+      RenderFlexibleBox {DIV} at (1,1) size 0x8
+        RenderBlock {DIV} at (0,0) size 0x8
+layer at (260,274) size 8x8
+  RenderBlock {DIV} at (-8,0) size 8x8
</ins><span class="cx"> layer at (277,270) size 16x16
</span><span class="cx">   RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
</span><span class="cx"> layer at (305,270) size 16x16
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacmediacontrolsstylingstrictexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/media/controls-styling-strict-expected.txt (158712 => 158713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/media/controls-styling-strict-expected.txt        2013-11-06 03:36:32 UTC (rev 158712)
+++ trunk/LayoutTests/platform/mac/media/controls-styling-strict-expected.txt        2013-11-06 03:50:51 UTC (rev 158713)
</span><span class="lines">@@ -43,6 +43,13 @@
</span><span class="cx">   RenderBlock {DIV} at (0,0) size 6x6 [bgcolor=#FFFFFF]
</span><span class="cx"> layer at (274,267) size 22x22
</span><span class="cx">   RenderFlexibleBox {DIV} at (266,2) size 22x22
</span><ins>+layer at (274,267) size 2x22
+  RenderFlexibleBox {DIV} at (0,0) size 2x22 [border: (1px solid #000000F3)]
+    RenderSlider {INPUT} at (-7,6) size 2x10 [color=#909090] [border: (1px solid #000000DF)]
+      RenderFlexibleBox {DIV} at (1,1) size 0x8
+        RenderBlock {DIV} at (0,0) size 0x8
+layer at (260,274) size 8x8
+  RenderBlock {DIV} at (-8,0) size 8x8
</ins><span class="cx"> layer at (277,270) size 16x16
</span><span class="cx">   RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
</span><span class="cx"> layer at (305,270) size 16x16
</span><span class="lines">@@ -76,6 +83,13 @@
</span><span class="cx">   RenderBlock {DIV} at (0,0) size 6x6 [bgcolor=#FFFFFF]
</span><span class="cx"> layer at (598,267) size 22x22
</span><span class="cx">   RenderFlexibleBox {DIV} at (266,2) size 22x22
</span><ins>+layer at (598,267) size 2x22
+  RenderFlexibleBox {DIV} at (0,0) size 2x22 [border: (1px solid #000000F3)]
+    RenderSlider {INPUT} at (-7,6) size 2x10 [color=#909090] [border: (1px solid #000000DF)]
+      RenderFlexibleBox {DIV} at (1,1) size 0x8
+        RenderBlock {DIV} at (0,0) size 0x8
+layer at (584,274) size 8x8
+  RenderBlock {DIV} at (-8,0) size 8x8
</ins><span class="cx"> layer at (601,270) size 16x16
</span><span class="cx">   RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
</span><span class="cx"> layer at (629,270) size 16x16
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacmediacontrolswithoutpreloadexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/media/controls-without-preload-expected.txt (158712 => 158713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/media/controls-without-preload-expected.txt        2013-11-06 03:36:32 UTC (rev 158712)
+++ trunk/LayoutTests/platform/mac/media/controls-without-preload-expected.txt        2013-11-06 03:50:51 UTC (rev 158713)
</span><span class="lines">@@ -39,6 +39,13 @@
</span><span class="cx">   RenderBlock {DIV} at (0,0) size 6x6 [bgcolor=#FFFFFF]
</span><span class="cx"> layer at (274,259) size 22x22
</span><span class="cx">   RenderFlexibleBox {DIV} at (266,2) size 22x22
</span><ins>+layer at (274,259) size 2x22
+  RenderFlexibleBox {DIV} at (0,0) size 2x22 [border: (1px solid #000000F3)]
+    RenderSlider {INPUT} at (-7,6) size 2x10 [color=#909090] [border: (1px solid #000000DF)]
+      RenderFlexibleBox {DIV} at (1,1) size 0x8
+        RenderBlock {DIV} at (0,0) size 0x8
+layer at (260,266) size 8x8
+  RenderBlock {DIV} at (-8,0) size 8x8
</ins><span class="cx"> layer at (277,262) size 16x16
</span><span class="cx">   RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
</span><span class="cx"> layer at (305,262) size 16x16
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (158712 => 158713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-11-06 03:36:32 UTC (rev 158712)
+++ trunk/Source/WebCore/ChangeLog        2013-11-06 03:50:51 UTC (rev 158713)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2013-11-05  James Craig  &lt;jcraig@apple.com&gt;
+
+        AX: media controls accessibility needs more work
+        https://bugs.webkit.org/show_bug.cgi?id=123749
+
+        Reviewed by Jer Noble.
+
+        Updated some of the control labels/roles to improve accessibility.
+          - Volume slider is now keyboard/screenreader accessible.
+          - muteButton was a checkbox toggling checked state, now a button that toggles label &quot;mute/unmute&quot;
+          - fullscreenButton was a checkbox toggling checked state, now a button that toggles label &quot;display/exit full screen&quot;
+          - captionButton was a checkbox, now a popup button that launches the newly accessible menu.
+        Subtitles menu is now keyboard/screenreader accessible (uses roaming tabindex).
+        Render dump expectations changed because volume slider is now hidden via... 
+        ...opacity/size (to make accessible without hover) instead of display:none.
+
+        Updated existing test coverage.
+
+        * Modules/mediacontrols/mediaControlsApple.css:
+        (audio::-webkit-media-controls-panel .volume-box):
+        (audio::-webkit-media-controls-panel .volume-box:active):
+        (audio::-webkit-media-controls-toggle-closed-captions-button):
+        (audio::-webkit-media-controls-closed-captions-container .list):
+        (audio::-webkit-media-controls-closed-captions-container li:focus):
+        * Modules/mediacontrols/mediaControlsApple.js:
+        (Controller.prototype.createControls):
+        (Controller.prototype.handleFullscreenChange):
+        (Controller.prototype.handleMuteButtonClicked):
+        (Controller.prototype.handleMinButtonClicked):
+        (Controller.prototype.handleMaxButtonClicked):
+        (Controller.prototype.handleVolumeSliderChange):
+        (Controller.prototype.buildCaptionMenu):
+        (Controller.prototype.focusSiblingCaptionItem):
+        (Controller.prototype.handleCaptionItemKeyUp):
+
</ins><span class="cx"> 2013-11-05  Andreas Kling  &lt;akling@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Move some plugin-specific code from RenderWidget to RenderEmbeddedObject.
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediacontrolsmediaControlsApplecss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css (158712 => 158713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css        2013-11-06 03:36:32 UTC (rev 158712)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css        2013-11-06 03:50:51 UTC (rev 158713)
</span><span class="lines">@@ -172,7 +172,6 @@
</span><span class="cx">     position: absolute;
</span><span class="cx">     box-sizing: border-box;
</span><span class="cx">     height: 22px;
</span><del>-    width: 114px;
</del><span class="cx">     bottom: 0;
</span><span class="cx">     left: 0;
</span><span class="cx"> 
</span><span class="lines">@@ -194,9 +193,12 @@
</span><span class="cx">     -webkit-justify-content: flex-end;
</span><span class="cx"> 
</span><span class="cx">     opacity: 0;
</span><del>-    display: none;
</del><ins>+    /* make zero width (rather than display:none) for AX and FKA */
+    width: 0; /* will become 114px when shown */
+
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/* FIXME: needs CSS4 !subject selector to show when slider inside .volume-box is focused */
</ins><span class="cx"> video::-webkit-media-controls-panel .mute-box:hover .volume-box,
</span><span class="cx"> video::-webkit-media-controls-panel .volume-box:hover,
</span><span class="cx"> video::-webkit-media-controls-panel .volume-box:active,
</span><span class="lines">@@ -204,7 +206,8 @@
</span><span class="cx"> audio::-webkit-media-controls-panel .volume-box:hover,
</span><span class="cx"> audio::-webkit-media-controls-panel .volume-box:active {
</span><span class="cx">     opacity: 1;
</span><del>-    display: inherit;
</del><ins>+    /* resize to usable amount (rather than display:none) for AX and FKA */
+    width: 114px;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> audio::-webkit-media-controls-volume-slider,
</span><span class="lines">@@ -268,8 +271,8 @@
</span><span class="cx">     width: 16px;
</span><span class="cx">     height: 16px;
</span><span class="cx">     margin: 0 7px;
</span><del>-
</del><span class="cx">     background-image: url('data:image/svg+xml,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 102 105&quot;&gt;&lt;linearGradient id=&quot;gradient&quot; x2=&quot;0&quot; y2=&quot;100%&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;rgb(216, 216, 216)&quot;/&gt;&lt;stop offset=&quot;0.46875&quot; stop-color=&quot;rgb(216, 216, 216)&quot;/&gt;&lt;stop offset=&quot;0.46875&quot; stop-color=&quot;rgb(208, 208, 208)&quot;/&gt;&lt;stop offset=&quot;0.53125&quot; stop-color=&quot;rgb(208, 208, 208)&quot;/&gt;&lt;stop offset=&quot;0.53125&quot; stop-color=&quot;rgb(200, 200, 200)&quot;/&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;rgb(208, 208, 208)&quot;/&gt;&lt;/linearGradient&gt;&lt;path d=&quot;M98.766,43.224c0-23.163-21.775-41.94-48.637-41.94c-26.859,0-48.635,18.777-48.635,41.94c0,18.266,13.546,33.796,32.444,39.549c1.131,8.356,26.037,24.255,22.864,19.921c-4.462-6.096-5.159-13.183-5.07-17.566C77.85,84.397,98.766,65.923,98.766,43.224z&quot; fill=&quot;url(#gradient)&quot;/&gt;&lt;/svg&gt;');
</span><ins>+    outline: 0;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> video::-webkit-media-controls-closed-captions-container,
</span><span class="lines">@@ -294,7 +297,7 @@
</span><span class="cx"> video::-webkit-media-controls-closed-captions-container .list,
</span><span class="cx"> audio::-webkit-media-controls-closed-captions-container .list {
</span><span class="cx">     display: block;
</span><del>-    font-family: &quot;Helvetica Bold&quot;, Helvetica;
</del><ins>+    font-family: &quot;Helvetica Bold&quot;, Helvetica, sans-serif;
</ins><span class="cx">     font-size: 10pt;
</span><span class="cx">     -webkit-user-select: none;
</span><span class="cx"> }
</span><span class="lines">@@ -337,6 +340,12 @@
</span><span class="cx">     border-bottom: 1px solid transparent;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+video::-webkit-media-controls-closed-captions-container li:focus,
+audio::-webkit-media-controls-closed-captions-container li:focus {
+    outline: 0;
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, rgba(255, 255, 255, 0.3)), color-stop(1, rgba(255, 255, 255, 0.2)));
+}
+
</ins><span class="cx"> video::-webkit-media-controls-closed-captions-container li:hover,
</span><span class="cx"> audio::-webkit-media-controls-closed-captions-container li:hover {
</span><span class="cx">     background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, rgb(79, 112, 246)), color-stop(1, rgb(26, 68, 243)));
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediacontrolsmediaControlsApplejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (158712 => 158713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js        2013-11-06 03:36:32 UTC (rev 158712)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js        2013-11-06 03:50:51 UTC (rev 158713)
</span><span class="lines">@@ -76,6 +76,19 @@
</span><span class="cx">         thumbnailTrack: 'thumbnail-track',
</span><span class="cx">         volumeBox: 'volume-box',
</span><span class="cx">     },
</span><ins>+    KeyCodes: {
+        enter: 13,
+        escape: 27,
+        space: 32,
+        pageUp: 33,
+        pageDown: 34,
+        end: 35,
+        home: 36,
+        left: 37,
+        up: 38,
+        right: 39,
+        down: 40
+    },
</ins><span class="cx"> 
</span><span class="cx">     // Localized string accessor
</span><span class="cx">     UIString: function(s){
</span><span class="lines">@@ -88,23 +101,26 @@
</span><span class="cx">         // FIXME: Move localization to ext strings file &lt;http://webkit.org/b/120956&gt;
</span><span class="cx">         'Aborted': 'Aborted',
</span><span class="cx">         'Audio Playback': 'Audio Playback',
</span><ins>+        'Captions': 'Captions',
</ins><span class="cx">         'Display Full Screen': 'Display Full Screen',
</span><span class="cx">         'Duration': 'Duration',
</span><ins>+        'Elapsed': 'Elapsed',
</ins><span class="cx">         'Error': 'Error',
</span><ins>+        'Exit Full Screen': 'Exit Full Screen',
</ins><span class="cx">         'Fast Forward': 'Fast Forward',
</span><span class="cx">         'Loading': 'Loading',
</span><span class="cx">         'Maximum Volume': 'Maximum Volume',
</span><span class="cx">         'Minimum Volume': 'Minimum Volume',
</span><span class="cx">         'Mute': 'Mute',
</span><ins>+        'Pause': 'Pause',
</ins><span class="cx">         'Play': 'Play',
</span><del>-        'Pause': 'Pause',
</del><ins>+        'Remaining': 'Remaining',
</ins><span class="cx">         'Rewind': 'Rewind',
</span><span class="cx">         'Rewind %%sec%% Seconds': 'Rewind %%sec%% Seconds',
</span><del>-        'Show Captions': 'Show Captions',
</del><span class="cx">         'Stalled': 'Stalled',
</span><ins>+        'Subtitles': 'Subtitles',
</ins><span class="cx">         'Suspended': 'Suspended',
</span><del>-        'Elapsed': 'Elapsed',
-        'Remaining': 'Remaining',
</del><ins>+        'Unmute': 'Unmute',
</ins><span class="cx">         'Video Playback': 'Video Playback',
</span><span class="cx">         'Volume': 'Volume',
</span><span class="cx">         'Waiting': 'Waiting'
</span><span class="lines">@@ -301,8 +317,6 @@
</span><span class="cx">         var muteButton = this.controls.muteButton = document.createElement('button');
</span><span class="cx">         muteButton.setAttribute('pseudo', '-webkit-media-controls-mute-button');
</span><span class="cx">         muteButton.setAttribute('aria-label', this.UIString('Mute'));
</span><del>-        muteButton.setAttribute('role', 'checkbox');
-        muteButton.setAttribute('aria-checked', 'false');
</del><span class="cx">         this.listenFor(muteButton, 'click', this.handleMuteButtonClicked);
</span><span class="cx"> 
</span><span class="cx">         var minButton = this.controls.minButton = document.createElement('button');
</span><span class="lines">@@ -329,16 +343,13 @@
</span><span class="cx"> 
</span><span class="cx">         var captionButton = this.controls.captionButton = document.createElement('button');
</span><span class="cx">         captionButton.setAttribute('pseudo', '-webkit-media-controls-toggle-closed-captions-button');
</span><del>-        captionButton.setAttribute('aria-label', this.UIString('Show Captions'));
-        captionButton.setAttribute('role', 'checkbox');
-        captionButton.setAttribute('aria-checked', 'false');
</del><ins>+        captionButton.setAttribute('aria-label', this.UIString('Captions'));
+        captionButton.setAttribute('aria-haspopup', 'true');
</ins><span class="cx">         this.listenFor(captionButton, 'click', this.handleCaptionButtonClicked);
</span><span class="cx"> 
</span><span class="cx">         var fullscreenButton = this.controls.fullscreenButton = document.createElement('button');
</span><span class="cx">         fullscreenButton.setAttribute('pseudo', '-webkit-media-controls-fullscreen-button');
</span><span class="cx">         fullscreenButton.setAttribute('aria-label', this.UIString('Display Full Screen'));
</span><del>-        fullscreenButton.setAttribute('role', 'checkbox');
-        fullscreenButton.setAttribute('aria-checked', 'false');
</del><span class="cx">         this.listenFor(fullscreenButton, 'click', this.handleFullscreenButtonClicked);
</span><span class="cx">     },
</span><span class="cx"> 
</span><span class="lines">@@ -519,11 +530,11 @@
</span><span class="cx"> 
</span><span class="cx">         if (this.isFullScreen()) {
</span><span class="cx">             this.controls.fullscreenButton.classList.add(this.ClassNames.exit);
</span><del>-            this.controls.fullscreenButton.setAttribute('aria-checked', 'true');
</del><ins>+            this.controls.fullscreenButton.setAttribute('aria-label', this.UIString('Exit Full Screen'));
</ins><span class="cx">             this.setControlsType(Controller.FullScreenControls);
</span><span class="cx">         } else {
</span><span class="cx">             this.controls.fullscreenButton.classList.remove(this.ClassNames.exit);
</span><del>-            this.controls.fullscreenButton.setAttribute('aria-checked', 'false');
</del><ins>+            this.controls.fullscreenButton.setAttribute('aria-label', this.UIString('Display Full Screen'));
</ins><span class="cx">             this.setControlsType(Controller.InlineControls);
</span><span class="cx">         }
</span><span class="cx">     },
</span><span class="lines">@@ -668,14 +679,14 @@
</span><span class="cx">     {
</span><span class="cx">         this.video.muted = !this.video.muted;
</span><span class="cx">         if (this.video.muted)
</span><del>-            this.controls.muteButton.setAttribute('aria-checked', 'true');
</del><ins>+            this.controls.muteButton.setAttribute('aria-label', this.UIString('Unmute'));
</ins><span class="cx">     },
</span><span class="cx"> 
</span><span class="cx">     handleMinButtonClicked: function(event)
</span><span class="cx">     {
</span><span class="cx">         if (this.video.muted) {
</span><span class="cx">             this.video.muted = false;
</span><del>-            this.controls.muteButton.setAttribute('aria-checked', 'false');
</del><ins>+            this.controls.muteButton.setAttribute('aria-label', this.UIString('Mute'));
</ins><span class="cx">         }
</span><span class="cx">         this.video.volume = 0;
</span><span class="cx">     },
</span><span class="lines">@@ -684,7 +695,7 @@
</span><span class="cx">     {
</span><span class="cx">         if (this.video.muted) {
</span><span class="cx">             this.video.muted = false;
</span><del>-            this.controls.muteButton.setAttribute('aria-checked', 'false');
</del><ins>+            this.controls.muteButton.setAttribute('aria-label', this.UIString('Mute'));
</ins><span class="cx">         }
</span><span class="cx">         this.video.volume = 1;
</span><span class="cx">     },
</span><span class="lines">@@ -693,7 +704,7 @@
</span><span class="cx">     {
</span><span class="cx">         if (this.video.muted) {
</span><span class="cx">             this.video.muted = false;
</span><del>-            this.controls.muteButton.setAttribute('aria-checked', 'false');
</del><ins>+            this.controls.muteButton.setAttribute('aria-label', this.UIString('Mute'));
</ins><span class="cx">         }
</span><span class="cx">         this.video.volume = this.controls.volume.value;
</span><span class="cx">     },
</span><span class="lines">@@ -928,16 +939,22 @@
</span><span class="cx">         list.classList.add(this.ClassNames.list);
</span><span class="cx"> 
</span><span class="cx">         var heading = document.createElement('h3');
</span><ins>+        heading.id = 'webkitMediaControlsClosedCaptionsHeading'; // for AX menu label
</ins><span class="cx">         list.appendChild(heading);
</span><del>-        heading.innerText = 'Subtitles';
</del><ins>+        heading.innerText = this.UIString('Subtitles');
</ins><span class="cx"> 
</span><span class="cx">         var ul = document.createElement('ul');
</span><ins>+        ul.setAttribute('role', 'menu');
+        ul.setAttribute('aria-labelledby', 'webkitMediaControlsClosedCaptionsHeading');
</ins><span class="cx">         list.appendChild(ul);
</span><span class="cx"> 
</span><span class="cx">         for (var i = 0; i &lt; tracks.length; ++i) {
</span><span class="cx">             var menuItem = document.createElement('li');
</span><ins>+            menuItem.setAttribute('role', 'menuitemradio');
+            menuItem.setAttribute('tabindex', '-1');
</ins><span class="cx">             this.captionMenuItems.push(menuItem);
</span><span class="cx">             this.listenFor(menuItem, 'click', this.captionItemSelected);
</span><ins>+            this.listenFor(menuItem, 'keyup', this.handleCaptionItemKeyUp);
</ins><span class="cx">             ul.appendChild(menuItem);
</span><span class="cx"> 
</span><span class="cx">             var track = tracks[i];
</span><span class="lines">@@ -950,19 +967,38 @@
</span><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             if (track === automaticItem) {
</span><del>-                if (displayMode === 'automatic')
</del><ins>+                if (displayMode === 'automatic') {
</ins><span class="cx">                     menuItem.classList.add(this.ClassNames.selected);
</span><ins>+                    menuItem.setAttribute('tabindex', '0');
+                    menuItem.setAttribute('aria-checked', 'true');
+                }
</ins><span class="cx">                 continue;
</span><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             if (displayMode != 'automatic' &amp;&amp; track.mode === 'showing') {
</span><span class="cx">                 var trackMenuItemSelected = true;
</span><span class="cx">                 menuItem.classList.add(this.ClassNames.selected);
</span><ins>+                menuItem.setAttribute('tabindex', '0');
+                menuItem.setAttribute('aria-checked', 'true');
</ins><span class="cx">             }
</span><ins>+
</ins><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (offMenu &amp;&amp; displayMode === 'forced-only' &amp;&amp; !trackMenuItemSelected)
</del><ins>+        if (offMenu &amp;&amp; displayMode === 'forced-only' &amp;&amp; !trackMenuItemSelected) {
</ins><span class="cx">             offMenu.classList.add(this.ClassNames.selected);
</span><ins>+            menuItem.setAttribute('tabindex', '0');
+            menuItem.setAttribute('aria-checked', 'true');
+        }
+        
+        // focus first selected menuitem
+        for (var i = 0, c = this.captionMenuItems.length; i &lt; c; i++) {
+            var item = this.captionMenuItems[i];
+            if (item.classList.contains(this.ClassNames.selected)) {
+                item.focus();
+                break;
+            }
+        }
+        
</ins><span class="cx">     },
</span><span class="cx"> 
</span><span class="cx">     captionItemSelected: function(event)
</span><span class="lines">@@ -971,6 +1007,51 @@
</span><span class="cx">         this.destroyCaptionMenu();
</span><span class="cx">     },
</span><span class="cx"> 
</span><ins>+    focusSiblingCaptionItem: function(event)
+    {
+        var currentItem = event.target;
+        var pendingItem = false;
+        switch(event.keyCode) {
+        case this.KeyCodes.left:
+        case this.KeyCodes.up:
+            pendingItem = currentItem.previousSibling;
+            break;
+        case this.KeyCodes.right:
+        case this.KeyCodes.down:
+            pendingItem = currentItem.nextSibling;
+            break;
+        }
+        if (pendingItem) {
+            currentItem.setAttribute('tabindex', '-1');
+            pendingItem.setAttribute('tabindex', '0');
+            pendingItem.focus();
+        }
+    },
+
+    handleCaptionItemKeyUp: function(event)
+    {
+        switch (event.keyCode) {
+        case this.KeyCodes.enter:
+        case this.KeyCodes.space:
+            this.captionItemSelected(event);
+            break;
+        case this.KeyCodes.escape:
+            this.destroyCaptionMenu();
+            break;
+        case this.KeyCodes.left:
+        case this.KeyCodes.up:
+        case this.KeyCodes.right:
+        case this.KeyCodes.down:
+            this.focusSiblingCaptionItem(event);
+            break;
+        default:
+            return;
+        }
+        // handled
+        event.stopPropagation();
+        event.preventDefault();
+    },
+
</ins><span class="cx">     destroyCaptionMenu: function()
</span><span class="cx">     {
</span><span class="cx">         if (!this.captionMenu)
</span><span class="lines">@@ -978,8 +1059,13 @@
</span><span class="cx"> 
</span><span class="cx">         this.captionMenuItems.forEach(function(item){
</span><span class="cx">             this.stopListeningFor(item, 'click', this.captionItemSelected);
</span><ins>+            this.stopListeningFor(item, 'keyup', this.handleCaptionItemKeyUp);
</ins><span class="cx">         }, this);
</span><span class="cx"> 
</span><ins>+        // FKA and AX: focus the trigger before destroying the element with focus
+        if (this.controls.captionButton)
+            this.controls.captionButton.focus();
+
</ins><span class="cx">         if (this.captionMenu.parentNode)
</span><span class="cx">             this.captionMenu.parentNode.removeChild(this.captionMenu);
</span><span class="cx">         delete this.captionMenu;
</span></span></pre>
</div>
</div>

</body>
</html>