@accesslint/core 0.6.0 → 0.6.2
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 +6 -10
- 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 +1074 -1009
- package/dist/rules/aria/aria-hidden-rules.d.ts.map +1 -1
- package/dist/rules/color/color-contrast.d.ts.map +1 -1
- package/dist/rules/forms/label.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
|
| ---- | ----- | ---- | ----------- |
|