Merge pull request #1052 from samikeijonen/issue/1045

Remove aria-haspopup: props @samikeijonen
This commit is contained in:
Tammie Lister 2016-12-23 14:30:14 +00:00 committed by GitHub
commit e38cfc29bc
1 changed files with 1 additions and 7 deletions

View File

@ -5,7 +5,7 @@
* navigation support for dropdown menus. * navigation support for dropdown menus.
*/ */
( function() { ( function() {
var container, button, menu, links, subMenus, i, len; var container, button, menu, links, i, len;
container = document.getElementById( 'site-navigation' ); container = document.getElementById( 'site-navigation' );
if ( ! container ) { if ( ! container ) {
@ -44,12 +44,6 @@
// Get all the link elements within the menu. // Get all the link elements within the menu.
links = menu.getElementsByTagName( 'a' ); links = menu.getElementsByTagName( 'a' );
subMenus = menu.getElementsByTagName( 'ul' );
// Set menu items with submenus to aria-haspopup="true".
for ( i = 0, len = subMenus.length; i < len; i++ ) {
subMenus[i].parentNode.setAttribute( 'aria-haspopup', 'true' );
}
// Each time a menu link is focused or blurred, toggle focus. // Each time a menu link is focused or blurred, toggle focus.
for ( i = 0, len = links.length; i < len; i++ ) { for ( i = 0, len = links.length; i < len; i++ ) {