@diegovelasquezweb/a11y-engine 0.6.2 → 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/assets/knowledge/knowledge.mjs +0 -22
- package/package.json +1 -1
- package/src/index.d.mts +0 -82
- 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,19 +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
266
|
export interface ConformanceLevelsResult {
|
|
280
267
|
locale: string;
|
|
281
268
|
version: string;
|
|
@@ -294,72 +281,6 @@ export interface SeverityLevelsResult {
|
|
|
294
281
|
severityLevels: SeverityLevel[];
|
|
295
282
|
}
|
|
296
283
|
|
|
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
|
-
export interface DocArticle {
|
|
338
|
-
id: string;
|
|
339
|
-
title: string;
|
|
340
|
-
icon?: string;
|
|
341
|
-
badge?: string;
|
|
342
|
-
summary: string;
|
|
343
|
-
body: string;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
export interface DocGroup {
|
|
347
|
-
id: string;
|
|
348
|
-
label: string;
|
|
349
|
-
articles: DocArticle[];
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
export interface DocSection {
|
|
353
|
-
id: string;
|
|
354
|
-
heading: string;
|
|
355
|
-
articles?: DocArticle[];
|
|
356
|
-
groups?: DocGroup[];
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
export interface KnowledgeDocs {
|
|
360
|
-
sections: DocSection[];
|
|
361
|
-
}
|
|
362
|
-
|
|
363
284
|
export interface UiHelp {
|
|
364
285
|
locale: string;
|
|
365
286
|
version: string;
|
|
@@ -382,7 +303,6 @@ export interface EngineKnowledge {
|
|
|
382
303
|
conformanceLevels: ConformanceLevel[];
|
|
383
304
|
wcagPrinciples: WcagPrinciple[];
|
|
384
305
|
severityLevels: SeverityLevel[];
|
|
385
|
-
outputs: OutputsInfo;
|
|
386
306
|
}
|
|
387
307
|
|
|
388
308
|
export interface KnowledgeOptions {
|
|
@@ -486,6 +406,4 @@ export function getWcagPrinciples(options?: KnowledgeOptions): WcagPrinciplesRes
|
|
|
486
406
|
|
|
487
407
|
export function getSeverityLevels(options?: KnowledgeOptions): SeverityLevelsResult;
|
|
488
408
|
|
|
489
|
-
export function getOutputsInfo(options?: KnowledgeOptions): OutputsInfoResult;
|
|
490
|
-
|
|
491
409
|
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
|
|