From 5bded32ba56a0b7ee95e13da2fa06e85bcf9f0bc Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Fri, 3 May 2019 15:27:16 +0200 Subject: [PATCH] Ignore invisible dropdown items in a11y --- .../install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js | 1 + 1 file changed, 1 insertion(+) 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; -- 2.20.1