mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-28 17:40:12 +00:00
b40c3f3743
Currently, the `aria-expanded` attribute is placed on the checkbox element. However, since Ife287fc8c6e0d2aee5facf42d5d4308dea918ee3, the checkbox is excluded from the accessibility tree, and this attribute should be placed on the label button instead. This commit prepares for future changes [1] to the checkbox hack interface in a backwards compatible way: * Passes button to `updateAriaExpanded` function * Passes button to `bindUpdateAriaExpandedOnInput` function [1] Ia2755e189babbd70945b66a1a812fc3ece40b577 Change-Id: Icc6ba994d57ea1f8050aa408aebc8c81f03d8783
17 lines
1 KiB
TypeScript
17 lines
1 KiB
TypeScript
interface CheckboxHack {
|
|
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;
|
|
bind(window: Window, checkbox: HTMLInputElement, button: HTMLElement, target: Node): CheckboxHackListeners;
|
|
unbind(window: Window, checkbox: HTMLInputElement, button: HTMLElement, listeners: CheckboxHackListeners): void;
|
|
}
|
|
|
|
interface CheckboxHackListeners {
|
|
onUpdateAriaExpandedOnInput?: EventListenerOrEventListenerObject;
|
|
onToggleOnClick?: EventListenerOrEventListenerObject;
|
|
onDismissOnClickOutside?: EventListenerOrEventListenerObject;
|
|
onDismissOnFocusLoss?: EventListenerOrEventListenerObject;
|
|
}
|