add accessibility message if mathjax is detected
use ie conditional html tags to detect for compatible ie versions
This commit is contained in:
16
lms/static/coffee/src/mathjax_accessible.coffee
Normal file
16
lms/static/coffee/src/mathjax_accessible.coffee
Normal file
@@ -0,0 +1,16 @@
|
||||
$ ->
|
||||
isMPInstalled = (boolean) ->
|
||||
# check if MathPlayer is installed
|
||||
# (from http://www.dessci.com/en/products/mathplayer/check.htm)
|
||||
try
|
||||
oMP = new ActiveXObject("MathPlayer.Factory.1")
|
||||
true
|
||||
catch e
|
||||
false
|
||||
|
||||
# detect if there is mathjax on the page
|
||||
# if not, set 'aria-hidden' to 'true'
|
||||
if MathJax? and not isMPInstalled()
|
||||
$("#mathjax-accessibility-message").attr("aria-hidden", "false")
|
||||
else
|
||||
$("#mathjax-accessibility-message").attr("aria-hidden", "true")
|
||||
Reference in New Issue
Block a user