From: Marcel Werk Date: Fri, 3 May 2019 13:27:16 +0000 (+0200) Subject: Ignore invisible dropdown items in a11y X-Git-Tag: 5.2.0_Alpha_1~108 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5bded32ba56a0b7ee95e13da2fa06e85bcf9f0bc;p=GitHub%2FWoltLab%2FWCF.git Ignore invisible dropdown items in a11y --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js index 390c7bf0d4..db7b6cc047 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js @@ -494,6 +494,7 @@ define( menu.removeEventListener('keydown', _callbackDropdownMenuKeyDown); menu.addEventListener('keydown', _callbackDropdownMenuKeyDown); elBySelAll('li', menu, function (listItem) { + if (!listItem.clientHeight) return; if (firstListItem === null) firstListItem = listItem; else if (listItem.classList.contains('active')) firstListItem = listItem;