Diff
Modified: trunk/LayoutTests/ChangeLog (192569 => 192570)
--- trunk/LayoutTests/ChangeLog 2015-11-18 11:02:43 UTC (rev 192569)
+++ trunk/LayoutTests/ChangeLog 2015-11-18 11:12:42 UTC (rev 192570)
@@ -1,3 +1,13 @@
+2015-11-18 Aaron Chu <arona....@gmail.com>
+
+ AX: Shadow DOM video player controls menus need aria-owns on the trigger buttons
+ https://bugs.webkit.org/show_bug.cgi?id=127065
+
+ Reviewed by Darin Adler.
+
+ * media/accessibility-closed-captions-has-aria-owns-expected.txt: Added.
+ * media/accessibility-closed-captions-has-aria-owns.html: Added.
+
2015-11-17 Carlos Garcia Campos <cgar...@igalia.com>
Null dereference loading Blink layout test editing/execCommand/indent-button-crash.html
Added: trunk/LayoutTests/media/accessibility-closed-captions-has-aria-owns-expected.txt (0 => 192570)
--- trunk/LayoutTests/media/accessibility-closed-captions-has-aria-owns-expected.txt (rev 0)
+++ trunk/LayoutTests/media/accessibility-closed-captions-has-aria-owns-expected.txt 2015-11-18 11:12:42 UTC (rev 192570)
@@ -0,0 +1,28 @@
+Bug 127065: AX: Shadow DOM video player controls menus need aria-owns on the trigger buttons
+
+Does the `aria-owns` on the CC button exist?
+
+PASS captionsButtonARIAOwnsValue is not null
+
+
+
+Did the Audio Track menu show up after the CC button is clicked?
+
+PASS captionsTrackMenuHTMLElement is not null
+
+
+
+Does the `id` of the menu exist?
+
+PASS closedCaptionsTrackMenuIdValue is not null
+
+
+
+Is the `aria-own` on the CC button equal to the `id` on the menu?
+
+PASS captionsButtonARIAOwnsValue is closedCaptionsTrackMenuIdValue
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
Added: trunk/LayoutTests/media/accessibility-closed-captions-has-aria-owns.html (0 => 192570)
--- trunk/LayoutTests/media/accessibility-closed-captions-has-aria-owns.html (rev 0)
+++ trunk/LayoutTests/media/accessibility-closed-captions-has-aria-owns.html 2015-11-18 11:12:42 UTC (rev 192570)
@@ -0,0 +1,91 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src=""
+ <script src=""
+ <script src=""
+ <script src=""
+</head>
+<body>
+ <p> Bug <a href="" AX: Shadow DOM video player controls menus need aria-owns on the trigger buttons</p>
+ <p id="console"></p>
+ <video id="video" controls width="500">
+ <source src="" type="video/mp4">
+ <track src="" label="English captions" kind="captions" srclang="en-us" default>
+ </video>
+
+ <script>
+ var captionsButtonHTMLElement;
+ var captionsButtonARIAOwnsValue;
+ var captionsTrackMenuHTMLElement;
+ var closedCaptionsTrackMenuIdValue;
+ var video;
+
+ if(!window.testRunner || !window.internals) {
+ failTest();
+ }
+
+ testRunner.dumpAsText();
+
+ start();
+
+ function start()
+ {
+
+ video = document.getElementById('video');
+
+ captionsButtonHTMLElement = mediaControlsElement(internals.shadowRoot(video).firstChild, '-webkit-media-controls-toggle-closed-captions-button');
+
+ checkForCCButtonARIAOwns();
+
+ captionsButtonHTMLElement.click();
+
+ ensureMenuExist();
+
+ checkForCCTrackMenuId();
+
+ confirmAriaOwnsRelationship();
+
+ testRunner.notifyDone();
+ }
+
+ function log(message)
+ {
+ document.getElementById("console").appendChild(document.createTextNode(message + '\n\n'));
+ }
+
+ function checkForCCButtonARIAOwns()
+ {
+ captionsButtonARIAOwnsValue = captionsButtonHTMLElement.getAttribute('aria-owns');
+ log('Does the `aria-owns` on the CC button exist?');
+ shouldNotBe('captionsButtonARIAOwnsValue', 'null');
+ log('\n');
+ }
+
+ function ensureMenuExist()
+ {
+ captionsTrackMenuHTMLElement = mediaControlsElement(internals.shadowRoot(video).firstChild, '-webkit-media-controls-closed-captions-container');
+ log('Did the Audio Track menu show up after the CC button is clicked?');
+ shouldNotBe('captionsTrackMenuHTMLElement','null');
+ log('\n');
+ }
+
+ function checkForCCTrackMenuId()
+ {
+ closedCaptionsTrackMenuIdValue = captionsTrackMenuHTMLElement.getAttribute('id');
+ log('Does the `id` of the menu exist?');
+ shouldNotBe('closedCaptionsTrackMenuIdValue', 'null');
+ log('\n');
+ }
+
+ function confirmAriaOwnsRelationship()
+ {
+ log('Is the `aria-own` on the CC button equal to the `id` on the menu?');
+ shouldBe('captionsButtonARIAOwnsValue', 'closedCaptionsTrackMenuIdValue');
+ }
+
+ </script>
+
+ <script src=""
+</body>
+</html>
\ No newline at end of file
Modified: trunk/Source/WebCore/ChangeLog (192569 => 192570)
--- trunk/Source/WebCore/ChangeLog 2015-11-18 11:02:43 UTC (rev 192569)
+++ trunk/Source/WebCore/ChangeLog 2015-11-18 11:12:42 UTC (rev 192570)
@@ -1,3 +1,19 @@
+2015-11-18 Aaron Chu <arona....@gmail.com>
+
+ AX: Shadow DOM video player controls menus need aria-owns on the trigger buttons
+ https://bugs.webkit.org/show_bug.cgi?id=127065
+
+ Reviewed by Darin Adler.
+
+ Test: media/accessibility-closed-captions-has-aria-owns.html
+
+ * Modules/mediacontrols/mediaControlsApple.js:
+ (Controller.prototype.createControls):
+ (Controller.prototype.buildCaptionMenu):
+ * Modules/mediacontrols/mediaControlsBase.js:
+ (Controller.prototype.createControls):
+ (Controller.prototype.buildCaptionMenu):
+
2015-11-17 Carlos Garcia Campos <cgar...@igalia.com>
Null dereference loading Blink layout test editing/execCommand/indent-button-crash.html
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (192569 => 192570)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2015-11-18 11:02:43 UTC (rev 192569)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2015-11-18 11:12:42 UTC (rev 192570)
@@ -468,6 +468,7 @@
captionButton.setAttribute('pseudo', '-webkit-media-controls-toggle-closed-captions-button');
captionButton.setAttribute('aria-label', this.UIString('Captions'));
captionButton.setAttribute('aria-haspopup', 'true');
+ captionButton.setAttribute('aria-owns', 'audioTrackMenu');
this.listenFor(captionButton, 'click', this.handleCaptionButtonClicked);
var fullscreenButton = this.controls.fullscreenButton = document.createElement('button');
@@ -1646,6 +1647,7 @@
this.captionMenu = document.createElement('div');
this.captionMenu.setAttribute('pseudo', '-webkit-media-controls-closed-captions-container');
+ this.captionMenu.setAttribute('id', 'audioTrackMenu');
this.base.appendChild(this.captionMenu);
this.captionMenuItems = [];
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsBase.js (192569 => 192570)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsBase.js 2015-11-18 11:02:43 UTC (rev 192569)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsBase.js 2015-11-18 11:12:42 UTC (rev 192570)
@@ -396,6 +396,7 @@
captionButton.setAttribute('pseudo', '-webkit-media-controls-toggle-closed-captions-button');
captionButton.setAttribute('aria-label', this.UIString('Captions'));
captionButton.setAttribute('aria-haspopup', 'true');
+ captionButton.setAttribute('aria-owns', 'audioTrackMenu');
this.listenFor(captionButton, 'click', this.handleCaptionButtonClicked);
var fullscreenButton = this.controls.fullscreenButton = document.createElement('button');
@@ -1133,6 +1134,7 @@
this.captionMenu = document.createElement('div');
this.captionMenu.setAttribute('pseudo', '-webkit-media-controls-closed-captions-container');
+ this.captionMenu.setAttribute('id', 'audioTrackMenu');
this.base.appendChild(this.captionMenu);
this.captionMenuItems = [];