Title: [196119] branches/safari-601.1.46-branch

Diff

Modified: branches/safari-601.1.46-branch/LayoutTests/ChangeLog (196118 => 196119)


--- branches/safari-601.1.46-branch/LayoutTests/ChangeLog	2016-02-04 12:46:12 UTC (rev 196118)
+++ branches/safari-601.1.46-branch/LayoutTests/ChangeLog	2016-02-04 16:22:07 UTC (rev 196119)
@@ -1,3 +1,21 @@
+2016-02-03  Matthew Hanson  <matthew_han...@apple.com>
+
+        Merge r196094. rdar://problem/24416768
+
+    2016-02-03  Matthew Hanson  <matthew_han...@apple.com>
+
+            Merge r192570. rdar://problem/24417428
+
+        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.
+
 2016-01-28  Babak Shafiei  <bshaf...@apple.com>
 
         Merge r195607.

Added: branches/safari-601.1.46-branch/LayoutTests/media/accessibility-closed-captions-has-aria-owns-expected.txt (0 => 196119)


--- branches/safari-601.1.46-branch/LayoutTests/media/accessibility-closed-captions-has-aria-owns-expected.txt	                        (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/media/accessibility-closed-captions-has-aria-owns-expected.txt	2016-02-04 16:22:07 UTC (rev 196119)
@@ -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: branches/safari-601.1.46-branch/LayoutTests/media/accessibility-closed-captions-has-aria-owns.html (0 => 196119)


--- branches/safari-601.1.46-branch/LayoutTests/media/accessibility-closed-captions-has-aria-owns.html	                        (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/media/accessibility-closed-captions-has-aria-owns.html	2016-02-04 16:22:07 UTC (rev 196119)
@@ -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: branches/safari-601.1.46-branch/Source/WebCore/ChangeLog (196118 => 196119)


--- branches/safari-601.1.46-branch/Source/WebCore/ChangeLog	2016-02-04 12:46:12 UTC (rev 196118)
+++ branches/safari-601.1.46-branch/Source/WebCore/ChangeLog	2016-02-04 16:22:07 UTC (rev 196119)
@@ -1,3 +1,27 @@
+2016-02-03  Matthew Hanson  <matthew_han...@apple.com>
+
+        Merge r196094. rdar://problem/24416768
+
+    2016-02-03  Matthew Hanson  <matthew_han...@apple.com>
+
+            Merge r192570. rdar://problem/24417428
+
+        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):
+
 2016-01-31  Babak Shafiei  <bshaf...@apple.com>
 
         Merge r195932. 

Modified: branches/safari-601.1.46-branch/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (196118 => 196119)


--- branches/safari-601.1.46-branch/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js	2016-02-04 12:46:12 UTC (rev 196118)
+++ branches/safari-601.1.46-branch/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js	2016-02-04 16:22:07 UTC (rev 196119)
@@ -463,6 +463,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');
@@ -1645,6 +1646,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: branches/safari-601.1.46-branch/Source/WebCore/Modules/mediacontrols/mediaControlsBase.js (196118 => 196119)


--- branches/safari-601.1.46-branch/Source/WebCore/Modules/mediacontrols/mediaControlsBase.js	2016-02-04 12:46:12 UTC (rev 196118)
+++ branches/safari-601.1.46-branch/Source/WebCore/Modules/mediacontrols/mediaControlsBase.js	2016-02-04 16:22:07 UTC (rev 196119)
@@ -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');
@@ -1129,6 +1130,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 = [];
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to