You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When you arrow left/right inside of a text run, nothing is spoken. I tracked this down to this.type not being set inside of MathAtom.MathAtom.prototype.toMathML.
To Reproduce
Either make sure that the mathfield you are working on has smartMode:true or see alternative entry below.
Type x=foo ("foo" will be text)
With a screen reader running, hit the right arrow key. No speech happens. If you arrow until you are in front of the =, you will hear "equals".
If smartMode is not on, then in step 2 type x=\text{foo} followed by 'enter'.
Source Code
Looking in the debugger in outputMathML.js, at the switch statement in MathAtom.MathAtom.prototype.toMathML, this.type is an empty string. There is no default case, so the result is empty since the switch expects some value.
I think there are two possible solutions:
this.type should be set (maybe to "text"?) somewhere. It seems wrong that the type is not set. Once set, add the appropriate case statement in MathAtom.MathAtom.prototype.toMathML
add a case '': to the switch statement and check for this.mode==='text'.
It is probably a good idea to add a default case to the switch statement that creates a console message if it is hit.
Note: put a breakpoint in _onAnnounce in mathfield.js and when it is hit, then put one on the switch statement in MathAtom.MathAtom.prototype.toMathML. The later is hit too often to be useful otherwise.
The text was updated successfully, but these errors were encountered:
Arno and I discussed this on a call and he felt that when mode==='text', then there is no type. So the proper thing to do is to check for mode==='text' and do the right thing. If it is not text, then do the switch.
Describe the bug
When you arrow left/right inside of a text run, nothing is spoken. I tracked this down to
this.type
not being set inside ofMathAtom.MathAtom.prototype.toMathML
.To Reproduce
smartMode:true
or see alternative entry below.x=foo
("foo" will be text)=
, you will hear "equals".If smartMode is not on, then in step 2 type
x=\text{foo}
followed by 'enter'.Source Code
Looking in the debugger in
outputMathML.js
, at the switch statement inMathAtom.MathAtom.prototype.toMathML
,this.type
is an empty string. There is no default case, so the result is empty since the switch expects some value.I think there are two possible solutions:
this.type
should be set (maybe to "text"?) somewhere. It seems wrong that the type is not set. Once set, add the appropriate case statement inMathAtom.MathAtom.prototype.toMathML
case '':
to the switch statement and check forthis.mode==='text'
.It is probably a good idea to add a default case to the switch statement that creates a console message if it is hit.
Note: put a breakpoint in _onAnnounce in mathfield.js and when it is hit, then put one on the switch statement in
MathAtom.MathAtom.prototype.toMathML
. The later is hit too often to be useful otherwise.The text was updated successfully, but these errors were encountered: