@diegovelasquezweb/a11y-engine 0.6.2 → 0.6.4
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/assets/knowledge/knowledge.mjs +0 -22
- package/package.json +1 -1
- package/src/index.d.mts +18 -74
- package/src/index.mjs +0 -20
|
@@ -238,28 +238,6 @@ export default {
|
|
|
238
238
|
body: "Filter findings by severity or WCAG principle to focus remediation.",
|
|
239
239
|
},
|
|
240
240
|
},
|
|
241
|
-
outputs: {
|
|
242
|
-
pdf: {
|
|
243
|
-
title: "Stakeholder Report",
|
|
244
|
-
description: "A formal PDF accessibility compliance report.",
|
|
245
|
-
detail: "Designed for clients, non-technical stakeholders, project managers, and auditors. Includes the compliance score, WCAG status, severity breakdown, and a prioritized list of findings with recommended fixes — formatted for sharing and sign-off.",
|
|
246
|
-
},
|
|
247
|
-
checklist: {
|
|
248
|
-
title: "Manual Checklist",
|
|
249
|
-
description: "An interactive WCAG 2.2 AA manual testing checklist.",
|
|
250
|
-
detail: "Automated scanners catch around 30–40% of accessibility issues. This checklist covers the remaining manual checks — keyboard navigation, screen reader behavior, focus management, motion, zoom, and cognitive accessibility. Use it alongside the automated findings for a complete audit.",
|
|
251
|
-
},
|
|
252
|
-
json: {
|
|
253
|
-
title: "JSON Export",
|
|
254
|
-
description: "Machine-readable snapshot of all findings, scores, and metadata.",
|
|
255
|
-
detail: "Useful for integrating with CI/CD pipelines, tracking compliance over time, importing into dashboards, or diffing two audits programmatically. Includes all enriched findings with WCAG mappings, fix code, severity, and page location.",
|
|
256
|
-
},
|
|
257
|
-
remediation: {
|
|
258
|
-
title: "Remediation Guide",
|
|
259
|
-
description: "A structured Markdown guide for AI agents and developers.",
|
|
260
|
-
detail: "Contains prioritized fixes with ready-to-use code snippets, framework-specific guardrails, WCAG mappings, selector context, and verification commands. Designed to be fed directly into an AI coding agent (Claude, Copilot, Cursor) or used by developers for systematic remediation.",
|
|
261
|
-
},
|
|
262
|
-
},
|
|
263
241
|
docs: {
|
|
264
242
|
sections: [
|
|
265
243
|
{
|
package/package.json
CHANGED
package/src/index.d.mts
CHANGED
|
@@ -263,77 +263,6 @@ export interface SeverityLevel {
|
|
|
263
263
|
order: number;
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
export interface OutputFormatInfo {
|
|
267
|
-
title: string;
|
|
268
|
-
description: string;
|
|
269
|
-
detail: string;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
export interface OutputsInfo {
|
|
273
|
-
pdf: OutputFormatInfo;
|
|
274
|
-
checklist: OutputFormatInfo;
|
|
275
|
-
json: OutputFormatInfo;
|
|
276
|
-
remediation: OutputFormatInfo;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
export interface ConformanceLevelsResult {
|
|
280
|
-
locale: string;
|
|
281
|
-
version: string;
|
|
282
|
-
conformanceLevels: ConformanceLevel[];
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
export interface WcagPrinciplesResult {
|
|
286
|
-
locale: string;
|
|
287
|
-
version: string;
|
|
288
|
-
wcagPrinciples: WcagPrinciple[];
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
export interface SeverityLevelsResult {
|
|
292
|
-
locale: string;
|
|
293
|
-
version: string;
|
|
294
|
-
severityLevels: SeverityLevel[];
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
export interface OutputsInfoResult {
|
|
298
|
-
locale: string;
|
|
299
|
-
version: string;
|
|
300
|
-
outputs: OutputsInfo;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
export interface ScannerHelp {
|
|
304
|
-
locale: string;
|
|
305
|
-
version: string;
|
|
306
|
-
title: string;
|
|
307
|
-
engines: ScannerEngineHelp[];
|
|
308
|
-
options: ScannerOptionHelp[];
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
export interface PersonaReferenceItem {
|
|
312
|
-
id: string;
|
|
313
|
-
icon: string;
|
|
314
|
-
label: string;
|
|
315
|
-
description: string;
|
|
316
|
-
keywords: string[];
|
|
317
|
-
mappedRules: string[];
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
export interface PersonaReference {
|
|
321
|
-
locale: string;
|
|
322
|
-
version: string;
|
|
323
|
-
personas: PersonaReferenceItem[];
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
export interface ConceptEntry {
|
|
327
|
-
title: string;
|
|
328
|
-
body: string;
|
|
329
|
-
context?: string;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
export interface GlossaryEntry {
|
|
333
|
-
term: string;
|
|
334
|
-
definition: string;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
266
|
export interface DocArticle {
|
|
338
267
|
id: string;
|
|
339
268
|
title: string;
|
|
@@ -360,6 +289,24 @@ export interface KnowledgeDocs {
|
|
|
360
289
|
sections: DocSection[];
|
|
361
290
|
}
|
|
362
291
|
|
|
292
|
+
export interface ConformanceLevelsResult {
|
|
293
|
+
locale: string;
|
|
294
|
+
version: string;
|
|
295
|
+
conformanceLevels: ConformanceLevel[];
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export interface WcagPrinciplesResult {
|
|
299
|
+
locale: string;
|
|
300
|
+
version: string;
|
|
301
|
+
wcagPrinciples: WcagPrinciple[];
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export interface SeverityLevelsResult {
|
|
305
|
+
locale: string;
|
|
306
|
+
version: string;
|
|
307
|
+
severityLevels: SeverityLevel[];
|
|
308
|
+
}
|
|
309
|
+
|
|
363
310
|
export interface UiHelp {
|
|
364
311
|
locale: string;
|
|
365
312
|
version: string;
|
|
@@ -382,7 +329,6 @@ export interface EngineKnowledge {
|
|
|
382
329
|
conformanceLevels: ConformanceLevel[];
|
|
383
330
|
wcagPrinciples: WcagPrinciple[];
|
|
384
331
|
severityLevels: SeverityLevel[];
|
|
385
|
-
outputs: OutputsInfo;
|
|
386
332
|
}
|
|
387
333
|
|
|
388
334
|
export interface KnowledgeOptions {
|
|
@@ -486,6 +432,4 @@ export function getWcagPrinciples(options?: KnowledgeOptions): WcagPrinciplesRes
|
|
|
486
432
|
|
|
487
433
|
export function getSeverityLevels(options?: KnowledgeOptions): SeverityLevelsResult;
|
|
488
434
|
|
|
489
|
-
export function getOutputsInfo(options?: KnowledgeOptions): OutputsInfoResult;
|
|
490
|
-
|
|
491
435
|
export function getKnowledge(options?: KnowledgeOptions): EngineKnowledge;
|
package/src/index.mjs
CHANGED
|
@@ -578,23 +578,6 @@ export function getSeverityLevels(options = {}) {
|
|
|
578
578
|
};
|
|
579
579
|
}
|
|
580
580
|
|
|
581
|
-
/**
|
|
582
|
-
* Returns output format descriptions for each report type the engine produces.
|
|
583
|
-
*
|
|
584
|
-
* @param {{ locale?: string }} [options={}]
|
|
585
|
-
* @returns {{ locale: string, version: string, outputs: object }}
|
|
586
|
-
*/
|
|
587
|
-
export function getOutputsInfo(options = {}) {
|
|
588
|
-
const locale = resolveKnowledgeLocale(options.locale || "en");
|
|
589
|
-
const payload = getKnowledgeData();
|
|
590
|
-
const outputs = payload.locales[locale]?.outputs || {};
|
|
591
|
-
return {
|
|
592
|
-
locale,
|
|
593
|
-
version: payload.version || "1.0.0",
|
|
594
|
-
outputs: clone(outputs),
|
|
595
|
-
};
|
|
596
|
-
}
|
|
597
|
-
|
|
598
581
|
export function getKnowledge(options = {}) {
|
|
599
582
|
const scanner = getScannerHelp(options);
|
|
600
583
|
const personas = getPersonaReference(options);
|
|
@@ -602,8 +585,6 @@ export function getKnowledge(options = {}) {
|
|
|
602
585
|
const conformance = getConformanceLevels(options);
|
|
603
586
|
const principles = getWcagPrinciples(options);
|
|
604
587
|
const severity = getSeverityLevels(options);
|
|
605
|
-
const outputsInfo = getOutputsInfo(options);
|
|
606
|
-
|
|
607
588
|
const payload = getKnowledgeData();
|
|
608
589
|
const docs = clone(payload.locales[scanner.locale]?.docs ?? { sections: [] });
|
|
609
590
|
|
|
@@ -622,7 +603,6 @@ export function getKnowledge(options = {}) {
|
|
|
622
603
|
conformanceLevels: conformance.conformanceLevels,
|
|
623
604
|
wcagPrinciples: principles.wcagPrinciples,
|
|
624
605
|
severityLevels: severity.severityLevels,
|
|
625
|
-
outputs: outputsInfo.outputs,
|
|
626
606
|
};
|
|
627
607
|
}
|
|
628
608
|
|