覆盖 mathjax 可访问性蓝框功能

Override mathjax accessibility blue box feature

如何覆盖 mathjax 中在方程周围放置一个蓝色方框的辅助功能?我只是希望它在单击时像普通文本一样响应,即没有蓝框。

例如,单击此处的方程式: http://jsfiddle.net/dandiebolt/AqDCA/

\(ax^2 + bx + c = 0\)

您可能在描述本机浏览器行为,即向焦点元素添加轮廓(默认样式取决于浏览器)。可以通过单击将 MathJax 元素置于焦点,因为它们已添加到 tabindex 以实现可访问性目的。

所以第一条答案必须是:不要这样做。不要放弃可访问性。

如果您不喜欢默认的浏览器轮廓,请设计它!所有这些都需要像

.MathJax:focus, .mjx-chtml:focus, .MathJax_SVG:focus {
   outline: 1px solid gray;
}

(涵盖 MathJax 的 HTML-CSS、CommonHTML 和 SVG 输出。)

但这是一个丑陋的世界,所以如果您被迫放弃可访问性,您可以禁用 tabindex。

引用自MathJax documentation

inTabOrder: true

This controls whether math elements should be included in the tabindex. If set to true, MathJax will add tabindex=0to the output. If set to false, it will add tabindex="-1".

Developers are strongly discouraged from initially disabling this (by means of configuration) as it will render the menu inaccessible.

换句话说,除非您禁用菜单,否则不要破坏它的可访问性。 (另外,不要禁用菜单;它对于可访问性至关重要,尤其是在即将发布的 v2.7 版本中的增强功能。)