add accessibility message if mathjax is detected

use ie conditional html tags to detect for compatible ie versions
This commit is contained in:
Adam Palay
2013-09-13 15:07:23 -04:00
parent 75b7514c4f
commit 34362b88a6
3 changed files with 39 additions and 0 deletions

View 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")