Validate and recover HTML language metadata

Merged
IB
2d ago
+253-14

Changes

Report malformed static document language tags and offer a review-only edit to copy an explicit xml:lang into a missing HTML lang.

Verification

35 focused source tests, canonical documentation and accessibility scorecard checks. The adjacent Astro suite requires dependencies that are available to hosted CI.

Closes #293
Closes #314

Summary by CodeRabbit

  • New Features
    • Added an accessibility check that flags malformed static language tags on HTML documents while accepting valid tags, including private-use and grandfathered forms.
    • Added a reviewable fix that can copy a valid xml:lang value to a missing lang attribute in standalone HTML files when the source is unambiguous. The suggested edit preserves the original value and quote style.
  • Documentation
    • Added guidance for the new check and reviewable fix, and updated the accessibility rule list, navigation, and scorecard to include the new check.