@acot/acot-preset-axe 中文文档教程
@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
Name | Summary | :heavycheckmark: |
---|---|---|
@acot/axe/best-practice | Run the rules specified in the "best-practice" tag of Axe. | :heavycheckmark: |
@acot/axe/experimental | Run the rules specified in the "experimental" tag of Axe. | :heavycheckmark: |
@acot/axe/wcag21a | Run the rules specified in the "wcag21a" tag of Axe. | :heavycheckmark: |
@acot/axe/wcag21aa | Run the rules specified in the "wcag21aa" tag of Axe. | :heavycheckmark: |
@acot/axe/wcag2a | Run the rules specified in the "wcag2a" tag of Axe. | :heavycheckmark: |
@acot/axe/wcag2aa | Run the rules specified in the "wcag2aa" tag of Axe. | :heavycheckmark: |
@acot/axe/wcag2aaa | Run 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
Name | Summary | :heavycheckmark: |
---|---|---|
@acot/axe/best-practice | Run the rules specified in the "best-practice" tag of Axe. | :heavycheckmark: |
@acot/axe/experimental | Run the rules specified in the "experimental" tag of Axe. | :heavycheckmark: |
@acot/axe/wcag21a | Run the rules specified in the "wcag21a" tag of Axe. | :heavycheckmark: |
@acot/axe/wcag21aa | Run the rules specified in the "wcag21aa" tag of Axe. | :heavycheckmark: |
@acot/axe/wcag2a | Run the rules specified in the "wcag2a" tag of Axe. | :heavycheckmark: |
@acot/axe/wcag2aa | Run the rules specified in the "wcag2aa" tag of Axe. | :heavycheckmark: |
@acot/axe/wcag2aaa | Run the rules specified in the "wcag2aaa" tag of Axe. | :heavycheckmark: |