Merge "Update CheckboxHack interface for future placement of `aria-expanded` on label button"

This commit is contained in:
jenkins-bot 2020-06-30 01:13:42 +00:00 committed by Gerrit Code Review
commit a14e22fac4
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
interface CheckboxHack {
updateAriaExpanded(checkbox: HTMLInputElement): void;
bindUpdateAriaExpandedOnInput(checkbox: HTMLInputElement): CheckboxHackListeners;
updateAriaExpanded(checkbox: HTMLInputElement, button: HTMLElement): void;
bindUpdateAriaExpandedOnInput(checkbox: HTMLInputElement, button: HTMLElement): CheckboxHackListeners;
bindToggleOnClick(checkbox: HTMLInputElement, button: HTMLElement): CheckboxHackListeners;
bindDismissOnClickOutside(window: Window, checkbox: HTMLInputElement, button: HTMLElement, target: Node): CheckboxHackListeners;
bindDismissOnFocusLoss(window: Window, checkbox: HTMLInputElement, button: HTMLElement, target: Node): CheckboxHackListeners;

View File

@ -46,9 +46,9 @@ function initSidebar( document ) {
var button = document.getElementById( 'mw-sidebar-button' );
if ( checkbox instanceof HTMLInputElement && button ) {
checkboxHack.bindToggleOnClick( checkbox, button );
checkboxHack.bindUpdateAriaExpandedOnInput( checkbox );
checkboxHack.bindUpdateAriaExpandedOnInput( checkbox, button );
checkboxHack.updateAriaExpanded( checkbox );
checkboxHack.updateAriaExpanded( checkbox, button );
}
}