Skip to content

Navigation Menu

Sign in
Sign up

Fix html lang for all supported locales - #223

Open
yanhenrique-dev wants to merge 1 commit into
OpenMouse-Project:main from
yanhenrique-dev:fix/html-lang-all-locales
Open

Fix html lang for all supported locales #223
yanhenrique-dev wants to merge 1 commit into
OpenMouse-Project:main from
yanhenrique-dev:fix/html-lang-all-locales

Conversation

@yanhenrique-dev

@yanhenrique-dev yanhenrique-dev commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

documentElement.lang only mapped pt->pt-BR and fell back to en, so screen readers mispronounced es/fr/de/zh/ja/ko/ru (WCAG 3.1.1 Language of Page).

This maps every InterfaceLocale to BCP-47 (pt->pt-BR, zh->zh-CN, rest as-is) and only writes when changed to avoid extra renders.

Verified: npm test 105/105 passing, map covers all 9 locales.

documentElement.lang only mapped pt->pt-BR and fell back to en, mispronouncing es/fr/de/zh/ja/ko/ru in screen readers (WCAG 3.1.1). Map every InterfaceLocale to BCP-47 (zh->zh-CN) and only write when changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /