Diff
Modified: branches/safari-602-branch/LayoutTests/ChangeLog (203865 => 203866)
--- branches/safari-602-branch/LayoutTests/ChangeLog 2016-07-29 07:11:23 UTC (rev 203865)
+++ branches/safari-602-branch/LayoutTests/ChangeLog 2016-07-29 07:11:26 UTC (rev 203866)
@@ -1,5 +1,19 @@
2016-07-28 Babak Shafiei <bshaf...@apple.com>
+ Merge r203669. rdar://problem/27285070
+
+ 2016-07-24 Nan Wang <n_w...@apple.com>
+
+ AX: Video Controls: Volume cannot be adjusted using VO.
+ https://bugs.webkit.org/show_bug.cgi?id=160107
+
+ Reviewed by Dean Jackson.
+
+ * accessibility/mac/video-volume-slider-accessibility-expected.txt: Added.
+ * accessibility/mac/video-volume-slider-accessibility.html: Added.
+
+2016-07-28 Babak Shafiei <bshaf...@apple.com>
+
Merge r203667. rdar://problem/27506489
2016-07-24 David Kilzer <ddkil...@apple.com>
Added: branches/safari-602-branch/LayoutTests/accessibility/mac/video-volume-slider-accessibility-expected.txt (0 => 203866)
--- branches/safari-602-branch/LayoutTests/accessibility/mac/video-volume-slider-accessibility-expected.txt (rev 0)
+++ branches/safari-602-branch/LayoutTests/accessibility/mac/video-volume-slider-accessibility-expected.txt 2016-07-29 07:11:26 UTC (rev 203866)
@@ -0,0 +1,12 @@
+
+This tests that video tag's volume slider has percentage value description and 0.05 step.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS slider.valueDescription is 'AXValueDescription: 100%'
+PASS slider.intValue.toFixed(2) is '0.95'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: branches/safari-602-branch/LayoutTests/accessibility/mac/video-volume-slider-accessibility.html (0 => 203866)
--- branches/safari-602-branch/LayoutTests/accessibility/mac/video-volume-slider-accessibility.html (rev 0)
+++ branches/safari-602-branch/LayoutTests/accessibility/mac/video-volume-slider-accessibility.html 2016-07-29 07:11:26 UTC (rev 203866)
@@ -0,0 +1,50 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+<style>
+div.absolute {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ width: 400px;
+ height: 200px;
+ border: 1px solid #73AD21;
+}
+</style>
+</head>
+
+<body id="body">
+
+<div class="absolute" id="container" tabindex=0 id="region" title="region">
+<video id="video" width="400" height="200" controls>
+ <source src="" type="video/mp4">
+ Test Video.
+</video>
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests that video tag's volume slider has percentage value description and 0.05 step.");
+
+ if (window.accessibilityController) {
+
+ var video = accessibilityController.accessibleElementById("container").childAtIndex(0);
+ var slider = video.childAtIndex(0).childAtIndex(6);
+
+ // First make sure the value description is in percentage.
+ shouldBe("slider.valueDescription", "'AXValueDescription: 100%'");
+
+ // Then decrement the slider and check the step is 0.05.
+ slider.decrement();
+ shouldBe("slider.intValue.toFixed(2)", "'0.95'");
+}
+
+</script>
+
+<script src=""
+</body>
+</html>
Modified: branches/safari-602-branch/Source/WebCore/ChangeLog (203865 => 203866)
--- branches/safari-602-branch/Source/WebCore/ChangeLog 2016-07-29 07:11:23 UTC (rev 203865)
+++ branches/safari-602-branch/Source/WebCore/ChangeLog 2016-07-29 07:11:26 UTC (rev 203866)
@@ -1,5 +1,27 @@
2016-07-28 Babak Shafiei <bshaf...@apple.com>
+ Merge r203669. rdar://problem/27285070
+
+ 2016-07-24 Nan Wang <n_w...@apple.com>
+
+ AX: Video Controls: Volume cannot be adjusted using VO.
+ https://bugs.webkit.org/show_bug.cgi?id=160107
+
+ Reviewed by Dean Jackson.
+
+ The volume slider in video tag had 0.01 step which caused the screen reader adjusting it slowly.
+ Changed the step to 0.05 and added the aria-valuetext attribute to the slider, so that the value
+ is spoken in percentage.
+
+ Test: accessibility/mac/video-volume-slider-accessibility.html
+
+ * Modules/mediacontrols/mediaControlsApple.js:
+ (Controller.prototype.createControls):
+ (Controller.prototype.handleVolumeSliderInput):
+ (Controller.prototype.updateVolume):
+
+2016-07-28 Babak Shafiei <bshaf...@apple.com>
+
Merge r203667. rdar://problem/27506489
2016-07-24 David Kilzer <ddkil...@apple.com>
Modified: branches/safari-602-branch/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (203865 => 203866)
--- branches/safari-602-branch/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2016-07-29 07:11:23 UTC (rev 203865)
+++ branches/safari-602-branch/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2016-07-29 07:11:26 UTC (rev 203866)
@@ -475,7 +475,7 @@
volume.type = 'range';
volume.min = 0;
volume.max = 1;
- volume.step = .01;
+ volume.step = .05;
this.listenFor(volume, 'input', this.handleVolumeSliderInput);
this.listenFor(volume, 'mousedown', this.handleVolumeSliderMouseDown);
this.listenFor(volume, 'mouseup', this.handleVolumeSliderMouseUp);
@@ -1163,6 +1163,7 @@
this.controls.muteButton.setAttribute('aria-label', this.UIString('Mute'));
}
this.video.volume = this.controls.volume.value;
+ this.controls.volume.setAttribute('aria-valuetext', this.controls.volume.value * 100 + '%');
this.drawVolumeBackground();
},
@@ -2083,6 +2084,7 @@
this.controls.muteButton.classList.remove(this.ClassNames.muted);
this.controls.volume.value = this.video.volume;
}
+ this.controls.volume.setAttribute('aria-valuetext', this.controls.volume.value * 100 + '%');
this.drawVolumeBackground();
},