Subchapter 2.53
references/editor-react-component/A11Y-REVIEW-REFERENCE.mdMarkdown9 KBView on GitHub
Use this reference for decisions that require code inspection after running the scanners in A11Y-REVIEW.md. The scanner output owns rule-specific context: rule ID, location, message, resolution path, evidence, and confidence. Do not maintain a separate rule catalog here.
Treat every scanner finding as a lead until the component implementation confirms how the flagged behavior reaches the rendered element.
confirmed, false-positive, or not-relevant.When both scanners flag the same issue, keep the finding with the strongest semantic evidence. The scanners complement each other; a finding from one scanner is not automatically stronger because of its tier.
Use high confidence when the code and scanner evidence unambiguously show the violation, for example:
Fix high-confidence findings immediately.
Use medium confidence when:
Read the surrounding code. If it confirms the inference, fix the issue. If it contradicts the inference, discard the finding. If the implementation remains unresolved, treat it as low confidence.
Use low confidence when:
Continue tracing the code. Fix only after the issue is confirmed; otherwise leave the code unchanged.
Confidence answers whether the issue is real. It does not decide whether a confirmed fix is safe.
If the violation is visible in the code and has a localized, behavior-preserving fix, treat it as confirmed and apply the fix.
Valid reasons to leave code unchanged:
Do not leave a confirmed safe/local issue unchanged because it is low severity, secondary, shared, or outside the first file in scope.
Resolve the rendered behavior in this order:
as="a" or component="button"node_moduleshref, to, src, alt, and roleFor local imports, follow the exported component’s rendered root. Continue through local or package components until the semantics resolve or the evidence becomes too weak.
For package imports, resolve the import from node_modules and inspect its exported entry point. If the package hides its rendered semantics, use prop and naming evidence without assigning more confidence than the evidence supports.
Run this checklist after scanner findings are triaged. Tier 2 is required even when both scanners return zero findings.
display: none remove content that should remain available to assistive technology?onClick on elements without built-in interaction (div, span, section, header, footer, li, td, and similar tags). Include conditional patterns such as {...(condition && { onClick: handler })}. Verify that each match also has the required role, tabIndex, and keyboard handler (onKeyDown or onKeyUp). A missing combination is a high-confidence finding.a11y prop and converted at the correct element?constants.ts or user-configurable a11y instead of hardcoded strings?ReactNode content prop with dir="ltr"?a11y and convertA11yKeysToHtmlFormat(a11y) according to ACCESSIBILITY.md.Before adding role="button", tabIndex, and keyboard handlers to an element such as <div>, verify all four conditions below.
Check whether the element conditionally or unconditionally contains <a>, <button>, <input>, <Link>, or a component that resolves to an interactive element. Button semantics on the parent would create nested interaction.
If interactive children are possible, either exclude that branch from the parent’s interaction condition or use a separate control element.
Check whether the element already receives tabIndex from another source, such as getTabIndexAttribute, an a11y prop spread, or an interactions framework. Determine the prop merge order and keep one source authoritative.
When an existing a11y spread should win, place the conditional interaction spread before it so tabIndex: 0 only acts as a fallback.
Read the full boolean expression that enables interaction. Verify that it:
=== undefined or === true when true, false, and undefined have different meaningsFix a fragile condition as part of the accessibility change. Correct semantics attached to the wrong state are still incorrect behavior.
Decide whether an accessible label names the interaction or the component as a whole. Keep a component-level label outside the interaction condition so it persists in non-interactive states. Apply an action-specific label only while that action is available.
Re-run both scanners on changed .tsx / .jsx files. Continue with npx wix build, npx wix generate manifest, and the project’s TypeScript check as required by A11Y-REVIEW.md.
Source