如何默认激活 MathJax 可访问性?
How to activate MathJax accessibility by default?
我来回搜索文档,找不到默认激活辅助功能的方法。只需右键单击 Mathjax 元素即可打开上下文菜单,然后 select accessibility->activate。
文档内容如下:
"The extension can be activated either via the context menu, which itself is fully accessible, or by default using configuration options. "
但我找不到任何关于如何使用配置激活它的提及。
This is the configuration 我找到了,那里没有 "activate" 选项。
我错过了什么?
(我使用的是最新的 MathJax 版本:3.0)
这是我配置 MathJax 的方式,下面是我得到的上下文菜单,其中辅助功能选项未激活。
MathJax = {
tex: {
inlineMath: [['##', '##'], ['\(', '\)']]
},
options: {
a11y: {
speech: true,
subtitles: true
}
}
};
黄色配置选项框的正下方显示 all of the accessibility options:-
我认为您是因为在描述中使用 a11y
而不是 AccessibilitY 而感到困惑 - 这是一个 numeronym 代表单词 'Accessibility'。这与 i18n (InternationalisatioN)
是的,我知道具有讽刺意味的是,这不是很容易访问,他们应该只使用这个词!
如果您配置了默认情况下将启用的所有选项,则不需要 'activate' - 这是通过包含 ally
及其子选项来完成的。 (请注意,如果您想向屏幕 reader 输出添加额外信息,您可能需要使用 enrichSpeech: 'shallow'
或 enrichSpeech: 'deep'
。)
MathJax = {
options: {
a11y: { //everything within here will be on if you set that item to a 'truthy' statement i.e. speech: true
在文档中翻了两天后,我放弃了。我认为默认情况下无法激活辅助功能。我个人认为这很荒谬,因为如果屏幕 reader 没有读取它,盲人究竟应该如何猜测如何激活它?
最终,我所做的是在每个页面的顶部位置隐藏一个 div,并附有如何激活插件的说明。我正在使用 css 来隐藏那个 div 来自所有用户,并将其显示在屏幕 reader 中,如下所示:
.accessibility_hint{font: 400 12px arial; color: #0e2d6d; background-color: white; position: absolute; left: 50%; margin-left: -55px; top: 0px; padding: 2px 4px; opacity: 0;}
.accessibility_hint:focus, .accessibility_hint:active{opacity: 1; z-index:999;}
the div is here. you'll see it only if you use keyborad navigation to focus on it
<div class=accessibility_hint tabindex=0>[insert textual explanation on how to use keyboard navigation to activate the plug-in]</div>
(这个评论有点长)。 Here 是 2019 年 11 月一次会议演讲的一些幻灯片,由 MathJax 的主要开发人员之一提供。引用它:
Switching on Accessibility
Navigate down to the Accessibility submenu entry
Open the submenu entry
Hit the Activate command
和
MathJax Cookie
MathJax uses a cookie to remember menu settings
Anything explicitly set in the menu will always overwrite settings made by the content/page author.
Thus a user can always retain their personal setting
They are retained until cookies for a page are deleted
通过 Javascript 讨论了设置,但没有讨论如何以编程方式打开辅助功能。因此,我会说当前的行为是“设计使然”的。
这对我来说似乎很奇怪,因为@einav 在他的回答中解释了原因。也就是说,虽然我不是 screen-reader 用户,但根据我对屏幕阅读器工作原理的极其有限的了解,我认为上下文菜单的存在应该是显而易见的,并且用户可能会期待 MathJax 的这种行为。这种想法可以解释设计决策。
我来回搜索文档,找不到默认激活辅助功能的方法。只需右键单击 Mathjax 元素即可打开上下文菜单,然后 select accessibility->activate。
文档内容如下: "The extension can be activated either via the context menu, which itself is fully accessible, or by default using configuration options. "
但我找不到任何关于如何使用配置激活它的提及。 This is the configuration 我找到了,那里没有 "activate" 选项。
我错过了什么?
(我使用的是最新的 MathJax 版本:3.0)
这是我配置 MathJax 的方式,下面是我得到的上下文菜单,其中辅助功能选项未激活。
MathJax = {
tex: {
inlineMath: [['##', '##'], ['\(', '\)']]
},
options: {
a11y: {
speech: true,
subtitles: true
}
}
};
黄色配置选项框的正下方显示 all of the accessibility options:-
我认为您是因为在描述中使用 a11y
而不是 AccessibilitY 而感到困惑 - 这是一个 numeronym 代表单词 'Accessibility'。这与 i18n (InternationalisatioN)
是的,我知道具有讽刺意味的是,这不是很容易访问,他们应该只使用这个词!
如果您配置了默认情况下将启用的所有选项,则不需要 'activate' - 这是通过包含 ally
及其子选项来完成的。 (请注意,如果您想向屏幕 reader 输出添加额外信息,您可能需要使用 enrichSpeech: 'shallow'
或 enrichSpeech: 'deep'
。)
MathJax = {
options: {
a11y: { //everything within here will be on if you set that item to a 'truthy' statement i.e. speech: true
在文档中翻了两天后,我放弃了。我认为默认情况下无法激活辅助功能。我个人认为这很荒谬,因为如果屏幕 reader 没有读取它,盲人究竟应该如何猜测如何激活它?
最终,我所做的是在每个页面的顶部位置隐藏一个 div,并附有如何激活插件的说明。我正在使用 css 来隐藏那个 div 来自所有用户,并将其显示在屏幕 reader 中,如下所示:
.accessibility_hint{font: 400 12px arial; color: #0e2d6d; background-color: white; position: absolute; left: 50%; margin-left: -55px; top: 0px; padding: 2px 4px; opacity: 0;}
.accessibility_hint:focus, .accessibility_hint:active{opacity: 1; z-index:999;}
the div is here. you'll see it only if you use keyborad navigation to focus on it
<div class=accessibility_hint tabindex=0>[insert textual explanation on how to use keyboard navigation to activate the plug-in]</div>
(这个评论有点长)。 Here 是 2019 年 11 月一次会议演讲的一些幻灯片,由 MathJax 的主要开发人员之一提供。引用它:
Switching on Accessibility
Navigate down to the Accessibility submenu entry
Open the submenu entry
Hit the Activate command
和
MathJax Cookie
MathJax uses a cookie to remember menu settings
Anything explicitly set in the menu will always overwrite settings made by the content/page author.
Thus a user can always retain their personal setting
They are retained until cookies for a page are deleted
通过 Javascript 讨论了设置,但没有讨论如何以编程方式打开辅助功能。因此,我会说当前的行为是“设计使然”的。
这对我来说似乎很奇怪,因为@einav 在他的回答中解释了原因。也就是说,虽然我不是 screen-reader 用户,但根据我对屏幕阅读器工作原理的极其有限的了解,我认为上下文菜单的存在应该是显而易见的,并且用户可能会期待 MathJax 的这种行为。这种想法可以解释设计决策。