@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 CHANGED
@@ -132,7 +132,7 @@ processNext();
132
132
 
133
133
  ### `configureRules(options: ConfigureOptions)`
134
134
 
135
- Customize which rules are active. Twenty rules are disabled by default (see `defaultDisabledRuleIds`); use `enabledRules` to re-enable them.
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
- // Re-enable a default-disabled rule
145
+ // Include AAA-level rules (excluded by default)
146
146
  configureRules({
147
- enabledRules: ["aria-roles"],
147
+ includeAAA: true,
148
148
  });
149
149
  ```
150
150
 
151
151
  ### `rules`
152
152
 
153
- Array of all 85 bundled `Rule` objects.
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 default-disabled and user-disabled rules (plus any re-enabled or additional rules from `configureRules()`).
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
- 69 rules active by default, covering WCAG 2.1 Level A and AA. An additional 16 rules are bundled but disabled by default; re-enable them via `configureRules({ enabledRules: [...] })`.
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, 2.2.4, 3.2.5 | Meta refresh must not redirect automatically. |
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. |