Remove unnecessary aria-expanded attribute on ul

Remove another irrelevant instance of aria-expanded
This commit is contained in:
Jared Caraway 2018-06-27 17:03:36 -05:00 committed by Ismail El Korchi
parent 6d16c0c673
commit b44cdaecbc
1 changed files with 0 additions and 4 deletions

View File

@ -25,7 +25,6 @@
return; return;
} }
menu.setAttribute( 'aria-expanded', 'false' );
if ( -1 === menu.className.indexOf( 'nav-menu' ) ) { if ( -1 === menu.className.indexOf( 'nav-menu' ) ) {
menu.className += ' nav-menu'; menu.className += ' nav-menu';
} }
@ -34,11 +33,9 @@
if ( -1 !== container.className.indexOf( 'toggled' ) ) { if ( -1 !== container.className.indexOf( 'toggled' ) ) {
container.className = container.className.replace( ' toggled', '' ); container.className = container.className.replace( ' toggled', '' );
button.setAttribute( 'aria-expanded', 'false' ); button.setAttribute( 'aria-expanded', 'false' );
menu.setAttribute( 'aria-expanded', 'false' );
} else { } else {
container.className += ' toggled'; container.className += ' toggled';
button.setAttribute( 'aria-expanded', 'true' ); button.setAttribute( 'aria-expanded', 'true' );
menu.setAttribute( 'aria-expanded', 'true' );
} }
}; };
@ -49,7 +46,6 @@
if ( ! isClickInside ) { if ( ! isClickInside ) {
container.className = container.className.replace( ' toggled', '' ); container.className = container.className.replace( ' toggled', '' );
button.setAttribute( 'aria-expanded', 'false' ); button.setAttribute( 'aria-expanded', 'false' );
menu.setAttribute( 'aria-expanded', 'false' );
} }
} ); } );