Skip to content

feat(enrichment): add accessibility regression analyzer (#2026) - #3574

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
jony376:feat/enrichment-a11y-regression-analyzer-2026
Jul 5, 2026
Merged

feat(enrichment): add accessibility regression analyzer (#2026)#3574
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
jony376:feat/enrichment-a11y-regression-analyzer-2026

Conversation

@jony376

@jony376 jony376 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a local REES a11y analyzer that flags newly added markup for missing img alt text, click-only handlers on non-interactive elements, unlabeled form controls, and positive tabIndex values
  • Register descriptor rendering, analyzer metadata, and manifest name parity
  • Unit tests cover all four rules, compliant markup skips, non-markup paths, and the findings cap

Closes #2026

Test plan

  • npm run typecheck
  • npm --prefix review-enrichment run build && npm run metadata && npm --prefix review-enrichment test (1071 tests)
  • npm run rees:test

Made with Cursor

Register a local REES a11y analyzer that flags newly added markup for
missing img alt text, click-only handlers, unlabeled form controls,
and positive tabindex values.

Closes JSONbored#2026

Co-authored-by: Cursor <cursoragent@cursor.com>
@jony376
jony376 requested a review from JSONbored as a code owner July 5, 2026 17:33
@superagent-security

Copy link
Copy Markdown
Contributor

🚨 Contributor flagged. Click here for more info: Superagent Dashboard

@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 5, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 5, 2026
@loopover-orb

loopover-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-05 17:40:35 UTC

10 files · 1 AI reviewer · no blockers · readiness 62/100 · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
This adds a new local, pure-compute a11y regression analyzer (regex-based detection of missing img alt, click-only handlers, unlabeled form controls, and positive tabIndex on added markup lines) and wires it through all the required registration points: registry.ts, analyzer-metadata.json, rees-analyzers.ts, types.ts, render.ts, enrichment-analyzer-names.ts, and .env.example profile lists. The hunk-parsing logic in scanPatchForA11yRegression correctly tracks new-line numbers across added/removed/context lines, and the per-file/aggregate MAX_FINDINGS cap (25) is applied consistently in both scanPatchForA11yRegression and scanA11yRegression. Unit tests exercise all four rules on both flagged and compliant markup, plus path exclusion, caps, and brief rendering, matching the described test plan; CI is green across build/typecheck/tests. This follows the same descriptor pattern as the many prior local analyzers already in the registry, so it's not scope creep.

Nits — 6 non-blocking
  • review-enrichment/src/analyzers/registry.ts:1178 and apps/gittensory-ui/src/lib/rees-analyzers.ts:1083-1084 hardcode the 25/2000 limits inline instead of importing MAX_FINDINGS/MAX_LINE_CHARS from a11y-regression.ts, so the descriptor metadata and the enforced values can silently drift apart.
  • NON_INTERACTIVE_CLICK_TARGET_RE in a11y-regression.ts:20-21 only lists a fixed tag allowlist (div/span/p/li/td/tr/section/article/header/footer/main/nav) — onClick on other non-interactive elements (e.g. img, svg, ul) won't be flagged; worth a comment noting this is a known heuristic gap.
  • isCommentLine in a11y-regression.ts:26-29 treats any line starting with `import` or `from` as a comment/skip — harmless today since those aren't markup lines, but the intent (skip import statements, not general comments) isn't obvious from the name.
  • The three analyzer registration files (registry.ts, rees-analyzers.ts, analyzer-metadata.json) each duplicate the full docs/limits object for the new analyzer verbatim — consistent with the existing pattern for other analyzers, but it's a recurring source of copy-paste drift across the ~1100+ line generated files.
  • Export MAX_FINDINGS/MAX_LINE_CHARS from review-enrichment/src/analyzers/a11y-regression.ts and reference them when constructing the `limits` fields in registry.ts and rees-analyzers.ts instead of restating 25/2000.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2026
Related work ⚠️ 2 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (1 linked issue).
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 1054 registered-repo PR(s), 728 merged, 41 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jony376; Gittensor profile; 1054 PR(s), 41 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: jony376
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: TypeScript, Python, JavaScript, Rust, MDX, Clojure, Cuda, Dart
  • Official Gittensor activity: 1054 PR(s), 41 issue(s).
  • Related work: Titles/paths share 7 meaningful terms. (issue #2023, issue #2026)
  • Related work: Titles/paths share 7 meaningful terms. (issue #2033, issue #2026)
Contributor next steps
  • Review top overlaps.
  • Add a concise scope and risk note.
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
  • Check active issues and PRs before submitting.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.11%. Comparing base (7408da9) to head (aa81225).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3574   +/-   ##
=======================================
  Coverage   93.11%   93.11%           
=======================================
  Files         305      305           
  Lines       31532    31532           
  Branches    11509    11509           
=======================================
  Hits        29361    29361           
  Misses       1517     1517           
  Partials      654      654           
Files with missing lines Coverage Δ
src/review/enrichment-analyzer-names.ts 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit fe6824d into JSONbored:main Jul 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:flagged Contributor flagged for review by trust analysis. gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(enrichment): accessibility regression detector analyzer

1 participant