Skip to content

test(a11y): add static accessibility harness#926

Closed
luoye520ww wants to merge 1 commit into
KunAgent:developfrom
luoye520ww:codex/accessibility-test-harness
Closed

test(a11y): add static accessibility harness#926
luoye520ww wants to merge 1 commit into
KunAgent:developfrom
luoye520ww:codex/accessibility-test-harness

Conversation

@luoye520ww

Copy link
Copy Markdown
Collaborator

Problem

The accessibility roadmap needs repeatable checks for high-risk markup, but the repository has no lightweight harness and no DOM test dependency.

Scope

Adds a test-only static markup auditor covering interactive names, form labels, dialog semantics, duplicate IDs, valid aria-labelledby references, and aria-hidden/type-hidden exemptions. It has no runtime or renderer behavior change and adds no dependency.

Non-goals

This is the shared harness only; Workbench, Settings, Write, Connect, and Workflow component remediation remain separate PRs.

Tests

  • npm.cmd exec vitest run src/renderer/src/testing/accessibility-harness.test.ts (5 passed)
  • npm.cmd run typecheck
  • npm.cmd --prefix kun run typecheck
  • npm.cmd run lint
  • npm.cmd run build
  • git diff --check

Review

Completed functional, lifecycle, data integrity, security, cross-platform, compatibility, and scope review. No package smoke is claimed because this is a test-only utility.

Issue

Part of #885

@XingYu-Zhong

Copy link
Copy Markdown
Collaborator

Thank you for introducing the accessibility-test direction. I am closing this PR in favor of #977.

The static regular-expression approach is useful as a prototype, but it cannot reliably model HTML structure and misses important cases such as multiple broken aria-labelledby references, duplicate IDs, hidden subtrees, form-label association, and custom keyboard semantics. The replacement is rebuilt on current develop with a parse5 tree audit and a real production-component test, while explicitly keeping browser/assistive-technology testing out of scope.

Your original contribution is credited in the replacement PR.

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.

2 participants