Improved accessibility in mobile page menu
authorMarcel Werk <burntime@woltlab.com>
Mon, 25 Jun 2018 16:01:46 +0000 (18:01 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 25 Jun 2018 16:01:46 +0000 (18:01 +0200)
com.woltlab.wcf/templates/headIncludeJavaScript.tpl
wcfsetup/install/files/acp/templates/header.tpl
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/Main.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/User.js

index 92dc326366b87db2457a51339a75f91f3c3f8d7b..d53e9cfa85fb5c68c01ac07eb240ad899df0a6f7 100644 (file)
@@ -109,7 +109,9 @@ requirejs.config({
                        'wcf.user.panel.markAllAsRead': '{lang}wcf.user.panel.markAllAsRead{/lang}',
                        'wcf.user.panel.markAsRead': '{lang}wcf.user.panel.markAsRead{/lang}',
                        'wcf.user.panel.settings': '{lang}wcf.user.panel.settings{/lang}',
-                       'wcf.user.panel.showAll': '{lang}wcf.user.panel.showAll{/lang}'
+                       'wcf.user.panel.showAll': '{lang}wcf.user.panel.showAll{/lang}',
+                       'wcf.menu.page': '{lang}wcf.menu.page{/lang}',
+                       'wcf.menu.user': '{lang}wcf.menu.user{/lang}'
                        {if MODULE_LIKE}
                                ,'wcf.like.button.like': '{lang}wcf.like.button.like{/lang}',
                                'wcf.like.button.dislike': '{lang}wcf.like.button.dislike{/lang}',
index 96c577aed09bdbdf5234c74c5edafa92d4dfe9b9..b97321d9d73e590c34ea48f6e79d14cf416c4aa2 100644 (file)
                                'wcf.global.success.add': '{lang}wcf.global.success.add{/lang}',
                                'wcf.global.success.edit': '{lang}wcf.global.success.edit{/lang}',
                                'wcf.global.thousandsSeparator': '{capture assign=thousandsSeparator}{lang}wcf.global.thousandsSeparator{/lang}{/capture}{@$thousandsSeparator|encodeJS}',
-                               'wcf.page.pagePosition': '{lang __literal=true}wcf.page.pagePosition{/lang}'
+                               'wcf.page.pagePosition': '{lang __literal=true}wcf.page.pagePosition{/lang}',
+                               'wcf.menu.page': '{lang}wcf.menu.page{/lang}',
+                               'wcf.menu.user': '{lang}wcf.menu.user{/lang}'
                                {event name='javascriptLanguageImport'}
                        });
                        
index 19ae1f67b91604ee62e868c91c0017f7989289bd..ce069ef8aab4064c1496817abd630f4d7a2f2a65 100644 (file)
@@ -6,7 +6,7 @@
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @module     WoltLabSuite/Core/Ui/Page/Menu/Main
  */
-define(['Core', 'Dom/Traverse', './Abstract'], function(Core, DomTraverse, UiPageMenuAbstract) {
+define(['Core', 'Language', 'Dom/Traverse', './Abstract'], function(Core, Language, DomTraverse, UiPageMenuAbstract) {
        "use strict";
        
        var _container = null, _hasItems = null, _list = null, _navigationList = null, _spacer = null;
@@ -43,6 +43,9 @@ define(['Core', 'Dom/Traverse', './Abstract'], function(Core, DomTraverse, UiPag
                                        }
                                }).bind(this));
                        }
+                       
+                       elAttr(this._button, 'aria-label', Language.get('wcf.menu.page'));
+                       elAttr(this._button, 'role', 'button');
                },
                
                open: function (event) {
index 2ae72d691523bc255281cfe921de9d8c4a53bfa1..42fb106f1e7005efb275a8a10bf19c643369c83c 100644 (file)
@@ -6,7 +6,7 @@
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @module     WoltLabSuite/Core/Ui/Page/Menu/User
  */
-define(['Core', 'EventHandler', './Abstract'], function(Core, EventHandler, UiPageMenuAbstract) {
+define(['Core', 'EventHandler', 'Language', './Abstract'], function(Core, EventHandler, Language, UiPageMenuAbstract) {
        "use strict";
        
        /**
@@ -53,6 +53,9 @@ define(['Core', 'EventHandler', './Abstract'], function(Core, EventHandler, UiPa
                                        }
                                }).bind(this));
                        }).bind(this));
+                       
+                       elAttr(this._button, 'aria-label', Language.get('wcf.menu.user'));
+                       elAttr(this._button, 'role', 'button');
                },
                
                close: function (event) {