@accesslint/core 0.6.1 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -11
- package/dist/index.cjs +5 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.iife.js +5 -5
- package/dist/index.js +1048 -952
- package/dist/rules/color/color-contrast.d.ts.map +1 -1
- package/dist/rules/index.d.ts +5 -6
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/keyboard/interactive-rules.d.ts.map +1 -1
- package/dist/rules/links/link-rules.d.ts.map +1 -1
- package/dist/rules/tables/table-headers.d.ts.map +1 -1
- package/dist/rules/utils/color.d.ts +25 -3
- package/dist/rules/utils/color.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -132,7 +132,7 @@ processNext();
|
|
|
132
132
|
|
|
133
133
|
### `configureRules(options: ConfigureOptions)`
|
|
134
134
|
|
|
135
|
-
Customize which rules are active.
|
|
135
|
+
Customize which rules are active.
|
|
136
136
|
|
|
137
137
|
```js
|
|
138
138
|
import { configureRules } from "@accesslint/core";
|
|
@@ -142,23 +142,19 @@ configureRules({
|
|
|
142
142
|
disabledRules: ["heading-order"],
|
|
143
143
|
});
|
|
144
144
|
|
|
145
|
-
//
|
|
145
|
+
// Include AAA-level rules (excluded by default)
|
|
146
146
|
configureRules({
|
|
147
|
-
|
|
147
|
+
includeAAA: true,
|
|
148
148
|
});
|
|
149
149
|
```
|
|
150
150
|
|
|
151
151
|
### `rules`
|
|
152
152
|
|
|
153
|
-
Array of all
|
|
154
|
-
|
|
155
|
-
### `defaultDisabledRuleIds`
|
|
156
|
-
|
|
157
|
-
`Set<string>` of the 16 rule IDs that are disabled by default. These can be re-enabled via `configureRules({ enabledRules: [...] })`.
|
|
153
|
+
Array of all bundled `Rule` objects.
|
|
158
154
|
|
|
159
155
|
### `getActiveRules(): Rule[]`
|
|
160
156
|
|
|
161
|
-
Returns bundled rules minus
|
|
157
|
+
Returns bundled rules minus user-disabled rules, excluding AAA-level rules unless `includeAAA` is set (plus any additional rules from `configureRules()`).
|
|
162
158
|
|
|
163
159
|
### `getRuleById(id: string): Rule | undefined`
|
|
164
160
|
|
|
@@ -179,7 +175,7 @@ Helpers for building custom rules:
|
|
|
179
175
|
|
|
180
176
|
## Rules
|
|
181
177
|
|
|
182
|
-
|
|
178
|
+
84 rules active by default, covering WCAG 2.1 Level A and AA. One additional AAA-level rule (`color-contrast-enhanced`) is bundled but excluded by default; include it via `configureRules({ includeAAA: true })`.
|
|
183
179
|
|
|
184
180
|
| Rule | Level | WCAG | Description |
|
|
185
181
|
| ---- | ----- | ---- | ----------- |
|
|
@@ -189,7 +185,7 @@ Helpers for building custom rules:
|
|
|
189
185
|
| `frame-title` | A | 4.1.2 | Frames must have an accessible name. |
|
|
190
186
|
| `frame-title-unique` | A | 4.1.2 | Frame titles should be unique. |
|
|
191
187
|
| `meta-viewport` | AA | 1.4.4 | Viewport meta must not disable user scaling. |
|
|
192
|
-
| `meta-refresh` | A | 2.2.1
|
|
188
|
+
| `meta-refresh` | A | 2.2.1 | Meta refresh must not redirect automatically. |
|
|
193
189
|
| `blink` | A | 2.2.2 | `<blink>` must not be used. |
|
|
194
190
|
| `marquee` | A | 2.2.2 | `<marquee>` must not be used. |
|
|
195
191
|
| `img-alt` | A | 1.1.1 | Images must have alternate text. |
|