@acot/acot-preset-axe 中文文档教程

发布于 3年前 浏览 24 项目主页 更新于 3年前

@acot/acot-preset-axe

为 acot 设置的 ax 规则。

Installation

通过 npm 安装:

$ npm install --save-dev @acot/acot-preset-axe

Usage

@acot/axe 添加到 acot 配置文件的 presets 字段。 然后在规则部分配置您要使用的规则。

{
  "presets": ["@acot/axe"],
  "rules": {
    "@acot/axe/wcag2a": "error"
  }
}

您还可以为我们的预设启用所有推荐的规则。 在extends中添加preset:@acot/axe/recommended

{
  "extends": ["preset:@acot/axe/recommended"]
}

Supported Rules

NameSummary:heavycheckmark:
@acot/axe/best-practiceRun the rules specified in the "best-practice" tag of Axe.:heavycheckmark:
@acot/axe/experimentalRun the rules specified in the "experimental" tag of Axe.:heavycheckmark:
@acot/axe/wcag21aRun the rules specified in the "wcag21a" tag of Axe.:heavycheckmark:
@acot/axe/wcag21aaRun the rules specified in the "wcag21aa" tag of Axe.:heavycheckmark:
@acot/axe/wcag2aRun the rules specified in the "wcag2a" tag of Axe.:heavycheckmark:
@acot/axe/wcag2aaRun the rules specified in the "wcag2aa" tag of Axe.:heavycheckmark:
@acot/axe/wcag2aaaRun the rules specified in the "wcag2aaa" tag of Axe.:heavycheckmark:

@acot/acot-preset-axe

An axe rule set for acot.

Installation

Install via npm:

$ npm install --save-dev @acot/acot-preset-axe

Usage

Add @acot/axe to the presets field of the acot config file. then configure the rules you want to use under the rules section.

{
  "presets": ["@acot/axe"],
  "rules": {
    "@acot/axe/wcag2a": "error"
  }
}

You can also enable all the recommended rules for our preset. Add preset:@acot/axe/recommended in extends:

{
  "extends": ["preset:@acot/axe/recommended"]
}

Supported Rules

NameSummary:heavycheckmark:
@acot/axe/best-practiceRun the rules specified in the "best-practice" tag of Axe.:heavycheckmark:
@acot/axe/experimentalRun the rules specified in the "experimental" tag of Axe.:heavycheckmark:
@acot/axe/wcag21aRun the rules specified in the "wcag21a" tag of Axe.:heavycheckmark:
@acot/axe/wcag21aaRun the rules specified in the "wcag21aa" tag of Axe.:heavycheckmark:
@acot/axe/wcag2aRun the rules specified in the "wcag2a" tag of Axe.:heavycheckmark:
@acot/axe/wcag2aaRun the rules specified in the "wcag2aa" tag of Axe.:heavycheckmark:
@acot/axe/wcag2aaaRun the rules specified in the "wcag2aaa" tag of Axe.:heavycheckmark:
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文