Adds tabbing and menu key event for for all renderers.
This commit is contained in:
parent
d73dbe2860
commit
189d4a8a81
|
@ -205,7 +205,9 @@
|
||||||
className:"MathJax_CHTML", id:jax.inputID+"-Frame", isMathJax:true, jaxID:this.id,
|
className:"MathJax_CHTML", id:jax.inputID+"-Frame", isMathJax:true, jaxID:this.id,
|
||||||
oncontextmenu:EVENT.Menu, onmousedown: EVENT.Mousedown,
|
oncontextmenu:EVENT.Menu, onmousedown: EVENT.Mousedown,
|
||||||
onmouseover:EVENT.Mouseover, onmouseout:EVENT.Mouseout, onmousemove:EVENT.Mousemove,
|
onmouseover:EVENT.Mouseover, onmouseout:EVENT.Mouseout, onmousemove:EVENT.Mousemove,
|
||||||
onclick:EVENT.Click, ondblclick:EVENT.DblClick
|
onclick:EVENT.Click, ondblclick:EVENT.DblClick,
|
||||||
|
// Added for keyboard accessible menu.
|
||||||
|
onkeydown: EVENT.Keydown, tabIndex: "0"
|
||||||
});
|
});
|
||||||
if (HUB.Browser.noContextMenu) {
|
if (HUB.Browser.noContextMenu) {
|
||||||
span.ontouchstart = TOUCH.start;
|
span.ontouchstart = TOUCH.start;
|
||||||
|
|
|
@ -571,7 +571,9 @@
|
||||||
oncontextmenu:EVENT.Menu, onmousedown: EVENT.Mousedown,
|
oncontextmenu:EVENT.Menu, onmousedown: EVENT.Mousedown,
|
||||||
onmouseover:EVENT.Mouseover, onmouseout:EVENT.Mouseout,
|
onmouseover:EVENT.Mouseover, onmouseout:EVENT.Mouseout,
|
||||||
onmousemove:EVENT.Mousemove, onclick:EVENT.Click,
|
onmousemove:EVENT.Mousemove, onclick:EVENT.Click,
|
||||||
ondblclick:EVENT.DblClick, onkeydown: EVENT.Keydown, tabIndex: "0"
|
ondblclick:EVENT.DblClick,
|
||||||
|
// Added for keyboard accessible menu.
|
||||||
|
onkeydown: EVENT.Keydown, tabIndex: "0"
|
||||||
});
|
});
|
||||||
if (HUB.Browser.noContextMenu) {
|
if (HUB.Browser.noContextMenu) {
|
||||||
span.ontouchstart = TOUCH.start;
|
span.ontouchstart = TOUCH.start;
|
||||||
|
@ -2869,7 +2871,6 @@
|
||||||
var alttext = this.Get("alttext");
|
var alttext = this.Get("alttext");
|
||||||
if (alttext && !span.getAttribute("aria-label")) span.setAttribute("aria-label",alttext);
|
if (alttext && !span.getAttribute("aria-label")) span.setAttribute("aria-label",alttext);
|
||||||
if (!span.getAttribute("role")) span.setAttribute("role","math");
|
if (!span.getAttribute("role")) span.setAttribute("role","math");
|
||||||
// span.setAttribute("tabindex",0); // causes focus outline, so disable for now
|
|
||||||
stack = HTMLCSS.createStack(span); box = HTMLCSS.createBox(stack);
|
stack = HTMLCSS.createStack(span); box = HTMLCSS.createBox(stack);
|
||||||
// Move font-size from outer span to stack to avoid line separation
|
// Move font-size from outer span to stack to avoid line separation
|
||||||
// problem in strict HTML mode
|
// problem in strict HTML mode
|
||||||
|
|
|
@ -326,6 +326,9 @@
|
||||||
container.onmousedown = EVENT.Mousedown;
|
container.onmousedown = EVENT.Mousedown;
|
||||||
container.onclick = EVENT.Click;
|
container.onclick = EVENT.Click;
|
||||||
container.ondblclick = EVENT.DblClick;
|
container.ondblclick = EVENT.DblClick;
|
||||||
|
// Added for keyboard accessible menu.
|
||||||
|
container.onkeydown = EVENT.Keydown;
|
||||||
|
container.tabIndex = "0";
|
||||||
if (HUB.Browser.noContextMenu) {
|
if (HUB.Browser.noContextMenu) {
|
||||||
container.ontouchstart = TOUCH.start;
|
container.ontouchstart = TOUCH.start;
|
||||||
container.ontouchend = TOUCH.end;
|
container.ontouchend = TOUCH.end;
|
||||||
|
|
|
@ -220,7 +220,9 @@
|
||||||
className:"MathJax_SVG", id:jax.inputID+"-Frame", isMathJax:true, jaxID:this.id,
|
className:"MathJax_SVG", id:jax.inputID+"-Frame", isMathJax:true, jaxID:this.id,
|
||||||
oncontextmenu:EVENT.Menu, onmousedown: EVENT.Mousedown,
|
oncontextmenu:EVENT.Menu, onmousedown: EVENT.Mousedown,
|
||||||
onmouseover:EVENT.Mouseover, onmouseout:EVENT.Mouseout, onmousemove:EVENT.Mousemove,
|
onmouseover:EVENT.Mouseover, onmouseout:EVENT.Mouseout, onmousemove:EVENT.Mousemove,
|
||||||
onclick:EVENT.Click, ondblclick:EVENT.DblClick
|
onclick:EVENT.Click, ondblclick:EVENT.DblClick,
|
||||||
|
// Added for keyboard accessible menu.
|
||||||
|
onkeydown: EVENT.Keydown, tabIndex: "0"
|
||||||
});
|
});
|
||||||
if (HUB.Browser.noContextMenu) {
|
if (HUB.Browser.noContextMenu) {
|
||||||
span.ontouchstart = TOUCH.start;
|
span.ontouchstart = TOUCH.start;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user