react-a11y-mining-prime-field-1q5l
Read-only JSSG mining package for React accessibility issues in .tsx and .jsx files. It is designed for Codemod Insights dashboards and does not rewrite source files.
What It Detects
button-missing-type:<button>without atypeattributeimg-missing-alt:<img>without analtattributeanchor-missing-href:<a>without anhrefattributeclickable-div-missing-keyboard-support:<div onClick={...}>withoutonKeyDown,onKeyUp, oronKeyPress
Scope And Preserve Cases
- Targets React JSX in
.tsxand.jsxfiles - Matches native lowercase HTML tags only, not component names like
<Button>or<Link> - Treats an issue as present only when the relevant attribute is missing entirely
- Leaves source code unchanged and returns
nullfor every file - Ignores
node_modules,dist, andbuild
Metric Design
Workflow step name: analyze
Metric: a11y_issue_instances
Cardinality keys:
issueTypeelementseveritylanguagetopLevelAreapathBucketcomponentOrFile
Metric: a11y_issue_files
Cardinality keys:
issueTypetopLevelAreapathBucketlanguage
Metric: a11y_issue_types_present
Cardinality keys:
issueType
Cardinality Notes
severityis alwayswarninglanguageis derived from the file extension and istsxorjsxtopLevelAreais the first path segment such asappsorpackagespathBucketis the first two path segments when available, such asapps/weborpackages/uicomponentOrFileis the file basename without its extension
Insights Queries
Issue type rollup:
ts
Path bucket rollup:
ts
Distinct issue types present:
ts
Development
bash
Validation Coverage
- Fixture tests assert that source files remain unchanged
metrics.jsonsnapshots assert expected metric increments for both.tsxand.jsxfixtures when the JSSG harness emits metrics snapshots- Package validation can additionally verify workflow and type-check health
License
MIT