@accesslint/core 0.8.1 → 0.8.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/dist/index.cjs +5 -5
- package/dist/index.iife.js +5 -5
- package/dist/index.js +345 -293
- package/dist/rules/adaptable/empty-table-header.d.ts.map +1 -1
- package/dist/rules/adaptable/td-has-header.d.ts.map +1 -1
- package/dist/rules/aria/aria-allowed-attr.d.ts.map +1 -1
- package/dist/rules/distinguishable/color-contrast-enhanced.d.ts.map +1 -1
- package/dist/rules/distinguishable/color-contrast-helpers.d.ts +4 -0
- package/dist/rules/distinguishable/color-contrast-helpers.d.ts.map +1 -1
- package/dist/rules/distinguishable/color-contrast.d.ts.map +1 -1
- package/dist/rules/distinguishable/link-in-text-block.d.ts.map +1 -1
- package/dist/rules/distinguishable/meta-viewport.d.ts.map +1 -1
- package/dist/rules/engine.d.ts.map +1 -1
- package/dist/rules/index.d.ts +5 -0
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/keyboard-accessible/focus-visible.d.ts.map +1 -1
- package/dist/rules/keyboard-accessible/scrollable-region.d.ts.map +1 -1
- package/dist/rules/labels-and-names/button-name.d.ts.map +1 -1
- package/dist/rules/labels-and-names/form-label.d.ts.map +1 -1
- package/dist/rules/labels-and-names/frame-title.d.ts.map +1 -1
- package/dist/rules/labels-and-names/input-button-name.d.ts.map +1 -1
- package/dist/rules/labels-and-names/label-content-mismatch.d.ts.map +1 -1
- package/dist/rules/navigable/empty-heading.d.ts.map +1 -1
- package/dist/rules/navigable/heading-order.d.ts.map +1 -1
- package/dist/rules/navigable/link-name.d.ts.map +1 -1
- package/dist/rules/navigable/p-as-heading.d.ts.map +1 -1
- package/dist/rules/text-alternatives/image-alt-words.d.ts.map +1 -1
- package/dist/rules/text-alternatives/img-alt.d.ts.map +1 -1
- package/dist/rules/text-alternatives/input-image-alt.d.ts.map +1 -1
- package/dist/rules/text-alternatives/object-alt.d.ts.map +1 -1
- package/dist/rules/text-alternatives/role-img-alt.d.ts.map +1 -1
- package/dist/rules/text-alternatives/svg-img-alt.d.ts.map +1 -1
- package/dist/rules/time-based-media/audio-transcript.d.ts.map +1 -1
- package/dist/rules/time-based-media/video-captions.d.ts.map +1 -1
- package/dist/rules/types.d.ts +8 -1
- package/dist/rules/types.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-table-header.d.ts","sourceRoot":"","sources":["../../../src/rules/adaptable/empty-table-header.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"empty-table-header.d.ts","sourceRoot":"","sources":["../../../src/rules/adaptable/empty-table-header.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,gBAAgB,EAAE,IAkC9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"td-has-header.d.ts","sourceRoot":"","sources":["../../../src/rules/adaptable/td-has-header.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAKrC,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"td-has-header.d.ts","sourceRoot":"","sources":["../../../src/rules/adaptable/td-has-header.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAKrC,eAAO,MAAM,WAAW,EAAE,IAyFzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aria-allowed-attr.d.ts","sourceRoot":"","sources":["../../../src/rules/aria/aria-allowed-attr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAgFrC,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"aria-allowed-attr.d.ts","sourceRoot":"","sources":["../../../src/rules/aria/aria-allowed-attr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAgFrC,eAAO,MAAM,eAAe,EAAE,IA0D7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-contrast-enhanced.d.ts","sourceRoot":"","sources":["../../../src/rules/distinguishable/color-contrast-enhanced.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGrC,eAAO,MAAM,qBAAqB,EAAE,
|
|
1
|
+
{"version":3,"file":"color-contrast-enhanced.d.ts","sourceRoot":"","sources":["../../../src/rules/distinguishable/color-contrast-enhanced.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGrC,eAAO,MAAM,qBAAqB,EAAE,IAgBnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-contrast-helpers.d.ts","sourceRoot":"","sources":["../../../src/rules/distinguishable/color-contrast-helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"color-contrast-helpers.d.ts","sourceRoot":"","sources":["../../../src/rules/distinguishable/color-contrast-helpers.ts"],"names":[],"mappings":"AA2GA,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,GAAG,KAAK;;;;;;;;;;;IA8H/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-contrast.d.ts","sourceRoot":"","sources":["../../../src/rules/distinguishable/color-contrast.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGrC,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"color-contrast.d.ts","sourceRoot":"","sources":["../../../src/rules/distinguishable/color-contrast.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGrC,eAAO,MAAM,aAAa,EAAE,IAgB3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-in-text-block.d.ts","sourceRoot":"","sources":["../../../src/rules/distinguishable/link-in-text-block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AA+ErC,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"link-in-text-block.d.ts","sourceRoot":"","sources":["../../../src/rules/distinguishable/link-in-text-block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AA+ErC,eAAO,MAAM,eAAe,EAAE,IAkF7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta-viewport.d.ts","sourceRoot":"","sources":["../../../src/rules/distinguishable/meta-viewport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGrC,eAAO,MAAM,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"meta-viewport.d.ts","sourceRoot":"","sources":["../../../src/rules/distinguishable/meta-viewport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGrC,eAAO,MAAM,YAAY,EAAE,IA4D1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/rules/engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAa,eAAe,EAAa,MAAM,SAAS,CAAC;AAI3E;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAkDpE;AAgDD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/rules/engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAa,eAAe,EAAa,MAAM,SAAS,CAAC;AAI3E;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAkDpE;AAgDD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,CAgMlE"}
|
package/dist/rules/index.d.ts
CHANGED
|
@@ -5,6 +5,11 @@ export interface ChunkedAudit {
|
|
|
5
5
|
processChunk(budgetMs: number): boolean;
|
|
6
6
|
/** Return all violations collected so far. */
|
|
7
7
|
getViolations(): Violation[];
|
|
8
|
+
/** Return rules that were skipped due to errors. */
|
|
9
|
+
getSkippedRules(): {
|
|
10
|
+
ruleId: string;
|
|
11
|
+
error: string;
|
|
12
|
+
}[];
|
|
8
13
|
}
|
|
9
14
|
export interface ConfigureOptions {
|
|
10
15
|
/** Additional rules to include (e.g. compiled declarative rules) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAyHxE,eAAO,MAAM,KAAK,EAAE,IAAI,EAmHvB,CAAC;AAGF,MAAM,WAAW,YAAY;IAC3B,2EAA2E;IAC3E,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IACxC,8CAA8C;IAC9C,aAAa,IAAI,SAAS,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rules/index.ts"],"names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|
1
|
-
{"version":3,"file":"focus-visible.d.ts","sourceRoot":"","sources":["../../../src/rules/keyboard-accessible/focus-visible.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"focus-visible.d.ts","sourceRoot":"","sources":["../../../src/rules/keyboard-accessible/focus-visible.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,YAAY,EAAE,IA0C1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollable-region.d.ts","sourceRoot":"","sources":["../../../src/rules/keyboard-accessible/scrollable-region.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAKrC,eAAO,MAAM,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"scrollable-region.d.ts","sourceRoot":"","sources":["../../../src/rules/keyboard-accessible/scrollable-region.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAKrC,eAAO,MAAM,gBAAgB,EAAE,IAmF9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-name.d.ts","sourceRoot":"","sources":["../../../src/rules/labels-and-names/button-name.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAgCrC,eAAO,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"button-name.d.ts","sourceRoot":"","sources":["../../../src/rules/labels-and-names/button-name.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAgCrC,eAAO,MAAM,UAAU,EAAE,IA8CxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-label.d.ts","sourceRoot":"","sources":["../../../src/rules/labels-and-names/form-label.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAwFrC,eAAO,MAAM,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"form-label.d.ts","sourceRoot":"","sources":["../../../src/rules/labels-and-names/form-label.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAwFrC,eAAO,MAAM,SAAS,EAAE,IAkDvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frame-title.d.ts","sourceRoot":"","sources":["../../../src/rules/labels-and-names/frame-title.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAKrC,eAAO,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"frame-title.d.ts","sourceRoot":"","sources":["../../../src/rules/labels-and-names/frame-title.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAKrC,eAAO,MAAM,UAAU,EAAE,IA+BxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-button-name.d.ts","sourceRoot":"","sources":["../../../src/rules/labels-and-names/input-button-name.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"input-button-name.d.ts","sourceRoot":"","sources":["../../../src/rules/labels-and-names/input-button-name.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,eAAe,EAAE,IAkC7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label-content-mismatch.d.ts","sourceRoot":"","sources":["../../../src/rules/labels-and-names/label-content-mismatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAqCrC,eAAO,MAAM,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"label-content-mismatch.d.ts","sourceRoot":"","sources":["../../../src/rules/labels-and-names/label-content-mismatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAqCrC,eAAO,MAAM,oBAAoB,EAAE,IA2FlC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-heading.d.ts","sourceRoot":"","sources":["../../../src/rules/navigable/empty-heading.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"empty-heading.d.ts","sourceRoot":"","sources":["../../../src/rules/navigable/empty-heading.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,YAAY,EAAE,IAwC1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading-order.d.ts","sourceRoot":"","sources":["../../../src/rules/navigable/heading-order.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"heading-order.d.ts","sourceRoot":"","sources":["../../../src/rules/navigable/heading-order.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,YAAY,EAAE,IAwC1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-name.d.ts","sourceRoot":"","sources":["../../../src/rules/navigable/link-name.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AA0BrC,eAAO,MAAM,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"link-name.d.ts","sourceRoot":"","sources":["../../../src/rules/navigable/link-name.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AA0BrC,eAAO,MAAM,QAAQ,EAAE,IAiCtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p-as-heading.d.ts","sourceRoot":"","sources":["../../../src/rules/navigable/p-as-heading.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"p-as-heading.d.ts","sourceRoot":"","sources":["../../../src/rules/navigable/p-as-heading.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,UAAU,EAAE,IAqDxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-alt-words.d.ts","sourceRoot":"","sources":["../../../src/rules/text-alternatives/image-alt-words.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAKrC;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"image-alt-words.d.ts","sourceRoot":"","sources":["../../../src/rules/text-alternatives/image-alt-words.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAKrC;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,IAiC3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"img-alt.d.ts","sourceRoot":"","sources":["../../../src/rules/text-alternatives/img-alt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAkCrC,eAAO,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"img-alt.d.ts","sourceRoot":"","sources":["../../../src/rules/text-alternatives/img-alt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAkCrC,eAAO,MAAM,MAAM,EAAE,IA2DpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-image-alt.d.ts","sourceRoot":"","sources":["../../../src/rules/text-alternatives/input-image-alt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"input-image-alt.d.ts","sourceRoot":"","sources":["../../../src/rules/text-alternatives/input-image-alt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,aAAa,EAAE,IA4B3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-alt.d.ts","sourceRoot":"","sources":["../../../src/rules/text-alternatives/object-alt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"object-alt.d.ts","sourceRoot":"","sources":["../../../src/rules/text-alternatives/object-alt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,SAAS,EAAE,IA+CvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role-img-alt.d.ts","sourceRoot":"","sources":["../../../src/rules/text-alternatives/role-img-alt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"role-img-alt.d.ts","sourceRoot":"","sources":["../../../src/rules/text-alternatives/role-img-alt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,UAAU,EAAE,IAqCxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svg-img-alt.d.ts","sourceRoot":"","sources":["../../../src/rules/text-alternatives/svg-img-alt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAmBrC,eAAO,MAAM,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"svg-img-alt.d.ts","sourceRoot":"","sources":["../../../src/rules/text-alternatives/svg-img-alt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAmBrC,eAAO,MAAM,SAAS,EAAE,IAkCvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audio-transcript.d.ts","sourceRoot":"","sources":["../../../src/rules/time-based-media/audio-transcript.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"audio-transcript.d.ts","sourceRoot":"","sources":["../../../src/rules/time-based-media/audio-transcript.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,eAAe,EAAE,IA0C7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video-captions.d.ts","sourceRoot":"","sources":["../../../src/rules/time-based-media/video-captions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"video-captions.d.ts","sourceRoot":"","sources":["../../../src/rules/time-based-media/video-captions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,aAAa,EAAE,IAkC3B,CAAC"}
|
package/dist/rules/types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* How easily an agent can fix violations of this rule:
|
|
3
3
|
* - `mechanical`: Deterministic fix, no judgment needed (e.g., remove tabindex > 0)
|
|
4
4
|
* - `contextual`: Needs surrounding context but an LLM can reason about it (e.g., suggest alt text)
|
|
5
|
-
* - `visual`: Requires seeing the rendered output or design intent (e.g., color contrast)
|
|
5
|
+
* - `visual`: Requires seeing the rendered output or design intent (e.g., color contrast). Violation context may include computed values like colors and ratios that partially bridge the gap.
|
|
6
6
|
*/
|
|
7
7
|
export type Fixability = "mechanical" | "contextual" | "visual";
|
|
8
8
|
export interface Rule {
|
|
@@ -14,6 +14,8 @@ export interface Rule {
|
|
|
14
14
|
tags?: string[];
|
|
15
15
|
/** How easily an agent can fix violations of this rule */
|
|
16
16
|
fixability?: Fixability;
|
|
17
|
+
/** Hint describing what an agent with browser access (screenshots, DevTools) can do to improve fixing or verifying this rule */
|
|
18
|
+
browserHint?: string;
|
|
17
19
|
description: string;
|
|
18
20
|
/** Generic remediation guidance for the AI to contextualize */
|
|
19
21
|
guidance?: string;
|
|
@@ -63,6 +65,10 @@ export interface AuditResult {
|
|
|
63
65
|
timestamp: number;
|
|
64
66
|
violations: Violation[];
|
|
65
67
|
ruleCount: number;
|
|
68
|
+
skippedRules: {
|
|
69
|
+
ruleId: string;
|
|
70
|
+
error: string;
|
|
71
|
+
}[];
|
|
66
72
|
}
|
|
67
73
|
export interface DiffResult {
|
|
68
74
|
/** Violations present in `after` but not in `before` */
|
|
@@ -115,6 +121,7 @@ export interface DeclarativeRule {
|
|
|
115
121
|
level: "A" | "AA" | "AAA";
|
|
116
122
|
tags?: string[];
|
|
117
123
|
fixability?: Fixability;
|
|
124
|
+
browserHint?: string;
|
|
118
125
|
guidance?: string;
|
|
119
126
|
fix?: FixSuggestion;
|
|
120
127
|
skipAriaHidden?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/rules/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,YAAY,GAAG,QAAQ,CAAC;AAEhE,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,EAAE,GAAG,GAAG,IAAI,GAAG,KAAK,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,GAAG,EAAE,QAAQ,GAAG,SAAS,EAAE,CAAC;CACjC;AAED,iEAAiE;AACjE,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC3D;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC3D;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAC/C;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,GA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,EAAE,gBAAgB,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,eAAe,CAAC;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,4DAA4D;IAC5D,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED,MAAM,MAAM,SAAS,GACjB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,mBAAmB,GACnB,kBAAkB,GAClB,iBAAiB,CAAC;AAEtB,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,EAAE,GAAG,GAAG,IAAI,GAAG,KAAK,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@accesslint/core",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Pure accessibility rule engine — WCAG audit with zero browser dependencies",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"build": "vite build --config vite.lib.config.ts && vite build --config vite.iife.config.ts && tsc -p tsconfig.lib.json",
|
|
22
22
|
"test": "vitest run",
|
|
23
23
|
"test:coverage": "vitest run --coverage",
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
"test:memory": "vitest run --config vite.memory.config.ts",
|
|
26
26
|
"act:download": "scripts/download-act-fixtures.sh && npx tsx src/act/download-fixtures.ts",
|
|
27
27
|
"test:act": "vitest run src/act/act.test.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
|
|
42
|
+
|
|
43
43
|
"@playwright/test": "^1.58.2",
|
|
44
44
|
"@vitest/coverage-v8": "^3.2.4",
|
|
45
45
|
"happy-dom": "^20.4.0",
|