版本适读检查
原能力
检查长度、信息密度、字幕或替代文本是否适合目标渠道和设备。(细化版 p.6–7)
首选项目
axe-core(MPL-2.0)。 axe-core
匹配范围
axe.run 核网页无障碍规则,问卷收集主观理解。
源码
axe-core · export default function run(
lib/core/public/run.js · 20–33 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
export default function run(...args) {
setupGlobals(args[0]);
const { context, options, callback = noop } = normalizeRunParams(args);
const { thenable, resolve, reject } = getPromiseHandlers(callback);
try {
assert(axe._audit, 'No audit configured');
assert(
!axe._running,
'Axe is already running. Use `await axe.run()` to wait ' +
'for the previous run to finish before starting a new run.'
);
} catch (e) {
return handleError(e, callback);
}
实现与验收要点
非网页版本、字幕语义、读者体验与长度标准。