Merge pull request #1303 from jaredcaraway/fix-aria-expanded

Remove unnecessary aria-expanded attribute on ul
This commit is contained in:
Ismail El Korchi 2020-04-11 20:53:58 +01:00 committed by GitHub
commit 55fafb9558
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 4 deletions

View File

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