Improved accessibility handling for the small drop-down menu.
authorjond@apple.com <jond@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Dec 2015 00:37:42 +0000 (00:37 +0000)
committerjond@apple.com <jond@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Dec 2015 00:37:42 +0000 (00:37 +0000)
* wp-content/themes/webkit/scripts/global.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192926 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Websites/webkit.org/ChangeLog
Websites/webkit.org/wp-content/themes/webkit/scripts/global.js

index 3d434dd..fb76ad3 100644 (file)
@@ -1,5 +1,11 @@
 2015-12-01  Jonathan Davis  <jond@apple.com>
 
+        Improved accessibility handling for the small drop-down menu.
+
+        * wp-content/themes/webkit/scripts/global.js:
+
+2015-12-01  Jonathan Davis  <jond@apple.com>
+
         Fixed font rendering. Fixed SVG rendering for Firefox.
 
         * wp-content/themes/webkit/images/icons.svg:
index 2dc6ea8..a1bd74c 100644 (file)
@@ -21,7 +21,10 @@ document.addEventListener('DOMContentLoaded', function () {
 
     for (var i = 0; i < menuitems.length; ++i) {
         menuitems[i].addEventListener('focus', function (e) {
-            var targetMenu = findParentMenu(findParentMenu(e.target, menuClass), menuClass),
+            var targetMenu = findParentMenu(e.target, menuClass),
+                targetMenuClass = null;
+                
+            if ( targetMenu != undefined )
                 targetMenuClass = targetMenu.className;
 
             for (var m = 0; m < menus.length; ++m) {