koddsson / koddsson/accessibility-scanner

Implement html-page-lang-matches-default rule (ucwvc8)

Open
#372 1 comment 0 reactions 0 assignees View on GitHub
needs-dependency
Dominant language
TypeScript
Stars
11
Forks
2
Avg merge
3d 6h
Merged PRs (30d)
11

Description

## ACT Rule
- **ACT Rule ID:** [ucwvc8](https://www.w3.org/WAI/standards-guidelines/act/rules/ucwvc8/)
- **Rule Name:** HTML page language subtag matches default language
- **WCAG SC:** 3.1.1 Language of Page (Level A)

## What it checks
This rule checks that the `lang` attribute of the `` element matches the default language of the page content.

## Feasibility
**DOM-only feasible.** Involves reading the `lang` attribute on `` and comparing against page content language.

## Notes
- Related to issue #350 (ACT rules triage)
- Companion to the existing `html-has-lang` and `html-lang-valid` rules
- May require a language detection heuristic for the page content

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by examining the existing html-has-lang and html-lang-valid rules, then read the linked ACT rule ucwvc8. Determine how page-content language should be detected and compared with the html lang attribute. Done means the new rule reliably reports whether the page language subtag matches the default content language.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, typescript
Domain
accessibility, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.