feat(atomic-a11y): add shared types, guards, constants and WCAG data modules#7122
Open
y-lakhdar wants to merge 17 commits intofeat/a11y-package-scaffoldfrom
Open
feat(atomic-a11y): add shared types, guards, constants and WCAG data modules#7122y-lakhdar wants to merge 17 commits intofeat/a11y-package-scaffoldfrom
y-lakhdar wants to merge 17 commits intofeat/a11y-package-scaffoldfrom
Conversation
…modules - Add src/shared/types.ts with unified type definitions (CriterionLevel, A11yReport, etc.) - Add src/shared/guards.ts with type guard functions (isRecord, isA11yReport) - Add src/shared/constants.ts with shared constants (DEFAULT_*, patterns, validation sets) - Add src/shared/file-utils.ts with file I/O utilities (readJsonFile, wasExecutedDirectly) - Add src/data/wcag-criteria.ts with WCAG 2.2 criteria definitions (56 entries) - Add src/data/axe-rule-mappings.ts with axe rule to WCAG mappings - Add src/data/criterion-metadata.ts with criterion metadata map - Update index.ts to export shared types, guards, constants and data modules - Add skipLibCheck to tsconfig.json
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2cf42d6b6b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This was referenced Feb 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The
@coveo/atomic-a11ypackage provides accessibility tooling for Atomic components — automated WCAG auditing, conformance reporting, and VPAT generation.This is the foundation layer that every other module depends on.
What this PR does
Establishes the shared type system, utility functions, and WCAG reference data that all downstream modules import from. Single source of truth.
Two directories:
src/shared/— TypeScript contracts (A11yReport,CriterionLevel, etc.), type guards, constants, and file I/O helperssrc/data/— WCAG 2.2 reference data (success criteria definitions, axe-core rule→WCAG mappings, criterion metadata), dynamically fetched at build time from the official W3C WCAG 2.2 JSONWCAG criteria generation
Instead of hard-coding the list of WCAG success criteria, a build-time script (
scripts/generate-wcag-criteria.mjs) fetches the authoritative W3C JSON and generatessrc/data/wcag-criteria.ts. This ensures the criteria stay in sync with the official spec without manual maintenance.Run
pnpm generate:wcagto regenerate. The generated file includes all Level A and AA criteria from WCAG 2.2 (55 total — 4.1.1 Parsing is excluded as it is obsolete in WCAG 2.2).PR Chain (2 of 7)
feat/a11y-package-scaffoldfeat/a11y-shared-foundationfeat/a11y-reporterfeat/a11y-openacrfeat/a11y-scriptsfeat/a11y-reporter-wiringfeat/a11y-ci-integrationKIT-5468