Merge "Fix aria-expanded status for user menu"

This commit is contained in:
jenkins-bot 2021-09-17 19:27:22 +00:00 committed by Gerrit Code Review
commit fe953ae505
1 changed files with 8 additions and 3 deletions

View File

@ -64,13 +64,18 @@
.vector-menu-checkbox-expanded,
.vector-menu-checkbox-collapsed {
.mixin-screen-reader-text();
display: none;
}
// Reveal correct "expanded" status text to screen readers based off checked status.
// Reveal correct "expanded" or "collapsed" status text to screen readers based off checked status.
// !important needed to override `.mw-ui-button.mw-ui-icon-element:not(.mw-ui-icon-with-label-desktop) span` rule in core
.vector-menu-checkbox:checked + .vector-menu-heading .vector-menu-checkbox-expanded,
.vector-menu-checkbox:not( :checked ) + .vector-menu-heading .vector-menu-checkbox-collapsed {
display: inline;
display: inline !important; /* stylelint-disable-line declaration-no-important */
}
.vector-menu-checkbox:not( :checked ) + .vector-menu-heading .vector-menu-checkbox-expanded,
.vector-menu-checkbox:checked + .vector-menu-heading .vector-menu-checkbox-collapsed {
display: none !important; /* stylelint-disable-line declaration-no-important */
}
// Hide and show menu content based off checked status.