Subchapter 2.54
references/editor-react-component/A11Y-REVIEW.mdMarkdown8 KBView on GitHub
Use this reference to audit and fix accessibility issues in an Editor React Component. This complements ACCESSIBILITY.md, which covers ARIA prop conventions and patterns, with an automated scan and triage workflow over the component’s runtime, manifest extension, and shared code.
This is not a separate skill. It runs as part of the Editor React Component workflow described in ../SKILL.md (opens in a new tab). Run it after editing the React/CSS sources and before npx wix build && npx wix generate manifest.
Two scanners live at the Editor React Component skill root:
node scripts/scan-a11y-eslint.cjs <file1> [file2] ...
node scripts/scan-a11y-code.cjs <file1> [file2] ...Run them from the consumer project root (the Wix CLI app’s working directory) so dependencies resolve from the project’s package.json. Pass paths relative to that cwd. The dependency preflight is part of the workflow in ../SKILL.md (opens in a new tab).
The ESLint scanner uses the explicitly declared eslint-plugin-jsx-a11y dev dependency. The semantic scanner follows imports up to four levels deep and adds resolution evidence and confidence to its findings.
Run the review when:
.tsx / .module.css files.Do not run on generated files (*.generated.ts); they are regenerated from JSX and CSS Modules.
Resolve scope before scanning:
| User says | Required scope |
|---|---|
| Specific file | That file plus any imported wrappers / shared components it renders |
| “this component” | <componentName>.tsx, component.tsx, <componentName>.extension.ts, plus shared imports |
| A component name | All in-component files (excluding *.generated.ts) |
| “full audit” | Every Editor React Component folder under src/extensions/site/components/, excluding *.generated.ts |
Execute every phase inline while editing. Do not pause for approval or add a separate summary phase.
src/extensions/site/components/<componentName>/.*.generated.ts.node scripts/scan-a11y-eslint.cjs <file1> [file2] ...Use each finding’s rule ID, message, and location as the rule-specific context. Validate the finding against the component implementation before editing.
node scripts/scan-a11y-code.cjs <file1> [file2] ...Use the emitted resolution path, evidence, and confidence to trace each finding. The scanner output is the source of rule-specific details; the reference only defines how to evaluate and act on those details.
Neither scanner validates manifest contracts or all Editor React Component patterns. Complete Phase 3 even when both scanners return zero findings.
Evaluate every finding before fixing it.
Deduplicate. When both scanners flag the same location for the same issue, keep the finding with richer evidence. Prefer the semantic scanner when it resolved the component topology; prefer ESLint when the issue is outside the semantic scanner’s scope.
| Verdict | Meaning | Action |
|---|---|---|
confirmed | The violation is real | Fix it |
false-positive | The rule fires but the rendered behavior is correct | Discard it |
not-relevant | The rule does not apply to this architecture | Discard it |
Use this order to evaluate a finding:
a11y prop and convertA11yKeysToHtmlFormat(a11y) (see ACCESSIBILITY.md). If the attributes reach the correct element through a runtime path the scanner cannot see, discard the finding as a false positive.onClick is spread conditionally with role, tabIndex, and onKeyDown, discard the finding as a false positive. If only onClick is conditional, confirm it.A11Y-REVIEW-REFERENCE.md.confirmed only after checking the available code and evidence.Only confirmed findings proceed to edits.
Perform a manual semantic review even when scanners return zero findings.
a11y?: A11y prop, never individual ariaLabel?: string, role?: string, and similar props. See ACCESSIBILITY.md.a11y is forwarded to the root via {...(a11y && convertA11yKeysToHtmlFormat(a11y))}, or to an inner element via elementProps.<name>.a11y when requirements specify.constants.ts or user-configurable a11y, never a hardcoded string literal.direction?: Direction, the root applies dir={direction} and the unconditional fallbackDirection class, and CSS defines .fallbackDirection:not([dir]). See DIRECTIONALITY.md.ReactNode content prop is rendered inside an element with dir="ltr" so user-provided nested content does not inherit the component direction.<componentName>.extension.ts overrides do not strip a11y-relevant manifest fields generated from the JSX.aria-hidden when appropriate.Use the full Tier 2 checklist in A11Y-REVIEW-REFERENCE.md.
Apply fixes only to findings that survived triage:
high: fix immediatelymedium: read the surrounding code, confirm, then fixlow: resolve the semantics from code and evidence; fix only when confirmedConfirmed safe/local fixes must be applied. Leave code unchanged only when the semantics remain ambiguous or the fix requires a risky, non-local behavior change. See A11Y-REVIEW-REFERENCE.md.
Fix principles:
elementProps, or shared base.a11y, use constants.ts for required labels, and never hardcode string literals.role, tabIndex, or keyboard handlers to a non-interactive element, run the pre-fix checks.If any .tsx / .jsx file was edited:
npx wix build && npx wix generate manifest so the manifest reflects any JSX changes.npx tsc --noEmit), which is already part of the wix-app validation flow.Verification is mandatory after edits. Continue directly from fixes to verification, and do not consider the workflow complete while a required check remains unrun.
A11Y-REVIEW-REFERENCE.md - triage, confidence, semantic resolution, Tier 2 checks, and pre-fix safeguardsACCESSIBILITY.md - ARIA conventions for Editor React Components