使用 WAVE 工具检查本地 html 文件

Inspecting local html files using WAVE tool

Wave 网络无障碍工具可用于检查网页,以检查其是否符合针对视障人士的无障碍标准。有什么方法可以使用此在线工具或其 Chrome 扩展来检查本地桌面服务器中托管的 html 文件?

如果您可以在浏览器中打开该页面,则可以使用该扩展程序来检查该页面。我只是在本地主机上的页面 运行 和我在 C 驱动器上作为文件打开的页面进行了尝试。

我在 Firefox 中使用 WAVE 插件。

根据their site

The toolbar can check intranet, password-protected, dynamically generated, or sensitive web pages. Also, because the WAVE toolbar evaluates the rendered version of your page, locally displayed styles and dynamically-generated content from scripts or AJAX can be evaluated.

但是,在线工具需要 public URL。

Firefox ax 扩展 https://addons.mozilla.org/en-US/firefox/addon/axe-devtools and the Chrome aXe extension https://chrome.google.com/webstore/detail/axe/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US 都允许分析服务器上、本地服务器上和本地文件系统上的文件。

ax 规则比 WAVE 规则更新,单击 "more info" link 时提供的说明清晰准确。如果你用的是 WAVE,那你一定要给 ax 试驾一下。

这是一个老问题,但为了让其他人像我在搜索 Chrome WAVE 扩展不适用于本地主机 URL 时一样找到它...

您似乎需要启用 "Allow access to file URLs"。

右键单击 WAVE 图标,单击 "Manage Extensions" 并翻转 "Allow access to file URLs" 开关。