From cfe6caeb15aa847c196618f92763697d7be4e207 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Tue, 10 Sep 2019 19:34:14 +0200 Subject: [PATCH] Improved a11y --- .../install/files/js/WoltLabSuite/Core/Ui/Page/Header/Menu.js | 2 ++ .../install/files/js/WoltLabSuite/Core/Ui/Page/JumpToTop.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Header/Menu.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Header/Menu.js index 5801bf3f82..4b56f1d55a 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Header/Menu.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Header/Menu.js @@ -180,6 +180,7 @@ define(['Environment', 'Language', 'Ui/Screen'], function(Environment, Language, _buttonShowNext.className = 'mainMenuShowNext'; _buttonShowNext.href = '#'; _buttonShowNext.innerHTML = ''; + elAttr(_buttonShowNext, 'aria-hidden', 'true'); _buttonShowNext.addEventListener(WCF_CLICK_EVENT, this._showNext.bind(this)); _menu.parentNode.appendChild(_buttonShowNext); @@ -188,6 +189,7 @@ define(['Environment', 'Language', 'Ui/Screen'], function(Environment, Language, _buttonShowPrevious.className = 'mainMenuShowPrevious'; _buttonShowPrevious.href = '#'; _buttonShowPrevious.innerHTML = ''; + elAttr(_buttonShowPrevious, 'aria-hidden', 'true'); _buttonShowPrevious.addEventListener(WCF_CLICK_EVENT, this._showPrevious.bind(this)); _menu.parentNode.insertBefore(_buttonShowPrevious, _menu.parentNode.firstChild); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/JumpToTop.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/JumpToTop.js index 4b961da75d..27e6d9d402 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/JumpToTop.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/JumpToTop.js @@ -30,7 +30,7 @@ define(['Environment', 'Language', './Action'], function(Environment, Language, button.className = 'jsTooltip'; button.href = '#'; elAttr(button, 'title', Language.get('wcf.global.scrollUp')); - elAttr(button, 'role', 'button'); + elAttr(button, 'aria-hidden', 'true'); button.innerHTML = ''; button.addEventListener(WCF_CLICK_EVENT, this._jump.bind(this)); -- 2.20.1