Skip to content

test(audit): add dedicated test suite for a11y sub-check (follow-up #256)#296

Merged
Wolfvin merged 1 commit into
mainfrom
test/issue-256-a11y-tests
Jul 16, 2026
Merged

test(audit): add dedicated test suite for a11y sub-check (follow-up #256)#296
Wolfvin merged 1 commit into
mainfrom
test/issue-256-a11y-tests

Conversation

@Wolfvin

@Wolfvin Wolfvin commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Follow-up to #256 (a11y restore, already merged).

Summary

The a11y restoration merged without a dedicated test file — test_command_registry.py only covers the allowlist, not the sub-check's actual behavior. This adds tests/test_a11y_command.py (6 tests) and corrects the design doc's Testing section to match what was actually verified.

Test plan

  • pytest tests/test_a11y_command.py — 6/6 on latest main
  • Re-verified end-to-end on the real Coretax workspace: audit . --check a11y → 165 findings (semantic_html 94, link_text 35, missing_label 24, keyboard_nav 5, missing_alt 4, color_contrast 3); --category missing_alt → 4
  • Design doc Testing section corrected — previously claimed "2 findings on tests/fixtures/sample.html", now reflects the real-workspace verification + the new test file

Third instance of the same pattern as export-snapshot (#218) and css-deep
(#251): a11y_engine.py (WCAG 2.1 — missing alt/labels, ARIA, keyboard-nav,
semantic HTML, color contrast, heading order, link text, focus management)
is fully functional but its CLI entry point was deleted in the #195
consolidation, leaving audit_accessibility() reachable from nowhere.

Verified the engine still works BEFORE wiring (per the issue constraint):
165 real findings on the Coretax smart-tax-assistance workspace.

Restored as `audit --check a11y` — sub-check under the audit umbrella
alongside dead-code/complexity/smell/css, NOT a new top-level command.
Command count stays exactly 12 (verified via --command-count).

New scripts/commands/a11y.py is a thin wrapper (no engine logic
duplicated, mirrors css_deep.py). --severity/--category passthrough
verified end-to-end: --category missing_alt narrows 165 -> 4.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@Wolfvin
Wolfvin merged commit 61d70a8 into main Jul 16, 2026
1 of 7 checks passed
@Wolfvin
Wolfvin deleted the test/issue-256-a11y-tests branch July 16, 2026 13:36
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant