Skip to content

Enable ACT tests for html-has-lang, html-lang-valid, empty-heading, duplicate-id#357

Open
koddsson wants to merge 1 commit intomainfrom
fix/348-act-tests-batch1
Open

Enable ACT tests for html-has-lang, html-lang-valid, empty-heading, duplicate-id#357
koddsson wants to merge 1 commit intomainfrom
fix/348-act-tests-batch1

Conversation

@koddsson
Copy link
Owner

Summary

  • Enabled ACT tests for b5c3f8 (html-has-lang), bf051a (html-lang-valid), ffd0e9 (empty-heading), 3ea0c8 (duplicate-id)
  • Bug fix: html-has-lang rule was implemented but never imported/registered in scanner.ts — now active
  • Bug fix: html-lang-valid now validates only the primary language subtag per BCP 47 (e.g. en-US-GB is valid because en is valid)
  • 11 new ACT test files generated (5 for html-has-lang, 6 for html-lang-valid)
  • Updated rules.json to mark all 4 as implemented

Part of #348

Test plan

  • All tests pass
  • No regressions

🤖 Generated with Claude Code

…uplicate-id

- Remove b5c3f8, bf051a, ffd0e9, 3ea0c8 from rulesToIgnore in generate-act-tests.js
- Register html-has-lang rule in scanner.ts (was implemented but not imported)
- Fix html-lang-valid to validate only the primary language subtag per BCP 47
  (e.g. "en-US-GB" is valid because primary subtag "en" is valid)
- Update unit test for html-lang-valid to match corrected behavior
- Mark html-has-lang, html-lang-valid, empty-heading, duplicate-id as
  implemented in rules.json
- Note: ffd0e9 (empty-heading) and 3ea0c8 (duplicate-id) have no WCAG-mapped
  ACT test cases, so no test files are generated for them

Part of #348

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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