www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit e3a62c0dfe165ed2b564be7c5646ded141af75d3
parent 3e190fc5f4f593d4344d932064b674231ebc2142
Author: zorkow <volker.sorge@gmail.com>
Date:   Mon, 14 Sep 2015 01:43:57 +0100

Fixes the menu role.

Diffstat:
Munpacked/extensions/MathMenu.js | 12+++++-------
1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/unpacked/extensions/MathMenu.js b/unpacked/extensions/MathMenu.js @@ -280,7 +280,7 @@ onmouseup: MENU.Mouseup, ondblclick: FALSE, ondragstart: FALSE, onselectstart: FALSE, oncontextmenu: FALSE, menuItem: this, className: "MathJax_Menu", onkeydown: MENU.Keydown, - role: "navigation" + role: "menu" }); if (!forceLTR) {MathJax.Localization.setCSS(menu)} @@ -897,9 +897,8 @@ role: "menuitemradio", Attributes: function(def) { - if (CONFIG.settings[this.variable] === this.value) { - def = HUB.Insert({"aria-checked": "true"}, def); - } + var checked = CONFIG.settings[this.variable] === this.value ? "true" : "false"; + def = HUB.Insert({"aria-checked": checked}, def); def = this.SUPER(arguments).Attributes.call(this, def); return def; }, @@ -947,9 +946,8 @@ role: "menuitemcheckbox", Attributes: function(def) { - if (CONFIG.settings[this.variable]) { - def = HUB.Insert({"aria-checked": "true"}, def); - } + var checked = CONFIG.settings[this.variable] ? "true" : "false"; + def = HUB.Insert({"aria-checked": checked}, def); def = this.SUPER(arguments).Attributes.call(this, def); return def; },