Fixes the menu role.
This commit is contained in:
parent
3e190fc5f4
commit
e3a62c0dfe
|
@ -280,7 +280,7 @@
|
||||||
onmouseup: MENU.Mouseup, ondblclick: FALSE,
|
onmouseup: MENU.Mouseup, ondblclick: FALSE,
|
||||||
ondragstart: FALSE, onselectstart: FALSE, oncontextmenu: FALSE,
|
ondragstart: FALSE, onselectstart: FALSE, oncontextmenu: FALSE,
|
||||||
menuItem: this, className: "MathJax_Menu", onkeydown: MENU.Keydown,
|
menuItem: this, className: "MathJax_Menu", onkeydown: MENU.Keydown,
|
||||||
role: "navigation"
|
role: "menu"
|
||||||
});
|
});
|
||||||
if (!forceLTR) {MathJax.Localization.setCSS(menu)}
|
if (!forceLTR) {MathJax.Localization.setCSS(menu)}
|
||||||
|
|
||||||
|
@ -897,9 +897,8 @@
|
||||||
role: "menuitemradio",
|
role: "menuitemradio",
|
||||||
|
|
||||||
Attributes: function(def) {
|
Attributes: function(def) {
|
||||||
if (CONFIG.settings[this.variable] === this.value) {
|
var checked = CONFIG.settings[this.variable] === this.value ? "true" : "false";
|
||||||
def = HUB.Insert({"aria-checked": "true"}, def);
|
def = HUB.Insert({"aria-checked": checked}, def);
|
||||||
}
|
|
||||||
def = this.SUPER(arguments).Attributes.call(this, def);
|
def = this.SUPER(arguments).Attributes.call(this, def);
|
||||||
return def;
|
return def;
|
||||||
},
|
},
|
||||||
|
@ -947,9 +946,8 @@
|
||||||
role: "menuitemcheckbox",
|
role: "menuitemcheckbox",
|
||||||
|
|
||||||
Attributes: function(def) {
|
Attributes: function(def) {
|
||||||
if (CONFIG.settings[this.variable]) {
|
var checked = CONFIG.settings[this.variable] ? "true" : "false";
|
||||||
def = HUB.Insert({"aria-checked": "true"}, def);
|
def = HUB.Insert({"aria-checked": checked}, def);
|
||||||
}
|
|
||||||
def = this.SUPER(arguments).Attributes.call(this, def);
|
def = this.SUPER(arguments).Attributes.call(this, def);
|
||||||
return def;
|
return def;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user