@@ -280,11 +280,6 @@ function ConfigureMathJax() {
280280 div = HTML . Element ( "div" , { className :"MathJax_SVG_Display" } ) ;
281281 div . appendChild ( span ) ;
282282 }
283- //
284- // Mark math for screen readers
285- // (screen readers don't know about role="math" yet, so use "textbox" instead)
286- //
287- div . setAttribute ( "role" , "textbox" ) ; div . setAttribute ( "aria-readonly" , "true" ) ;
288283 div . className += " MathJax_SVG_Processing" ;
289284 script . parentNode . insertBefore ( div , script ) ;
290285 //
@@ -313,11 +308,13 @@ function ConfigureMathJax() {
313308 SVG . BBOX . TEXT . Augment ( {
314309 Init : function ( scale , text , def ) {
315310 if ( ! def ) { def = { } } ; def . stroke = "none" ;
311+ if ( def [ "font-style" ] === "" ) delete def [ "font-style" ] ;
312+ if ( def [ "font-weight" ] === "" ) delete def [ "font-weight" ] ;
316313 this . SUPER ( arguments ) . Init . call ( this , def ) ;
317314 SVG . addText ( this . element , text ) ;
318315 var bbox = { width : text . length * 8.5 , height : 18 , y : - 12 } ;
319316 scale *= 1000 / SVG . em ;
320- this . element . setAttribute ( "style" , " font-family: monospace") ;
317+ this . element . setAttribute ( "font-family" , " monospace") ;
321318 this . element . setAttribute ( "transform" , "scale(" + scale + ") matrix(1 0 0 -1 0 0)" ) ;
322319 this . w = this . r = bbox . width * scale ; this . l = 0 ;
323320 this . h = this . H = - bbox . y * scale ;
@@ -599,11 +596,6 @@ function AdjustSVG() {
599596 nodes [ i ] . removeAttribute ( "href" ) ;
600597 }
601598 //
602- // Fix incorrect roles
603- //
604- nodes = document . querySelectorAll ( ".MathJax_SVG[role=textbox], .MathJax_SVG_Display[role=textbox]" ) ;
605- for ( i = nodes . length - 1 ; i >= 0 ; i -- ) nodes [ i ] . setAttribute ( "role" , "math" ) ;
606- //
607599 // Fix a problem with jsdom not setting width and height CSS.
608600 //
609601 nodes = document . querySelectorAll ( ".MathJax_SVG > span > span" ) ;
0 commit comments