Validate and recover HTML language metadata
Merged
IB
2d ago+253+253+012345678901234567890123456789-14-14-01234567890123456789
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.
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:langvalue to a missinglangattribute 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.