Skip to content

Comments

fix: add lang attribute to all HTML pages for accessibility#110

Closed
Kunal1522 wants to merge 1 commit intom-lab:mainfrom
Kunal1522:fix/html-lang-attribute
Closed

fix: add lang attribute to all HTML pages for accessibility#110
Kunal1522 wants to merge 1 commit intom-lab:mainfrom
Kunal1522:fix/html-lang-attribute

Conversation

@Kunal1522
Copy link
Contributor

@Kunal1522 Kunal1522 commented Feb 19, 2026

Fixes #111

None of the HTML pages declare a lang attribute on the <html> element, violating WCAG 2.1 criterion 3.1.1 (Language of Page).

Without it:

  • Screen readers cannot select the correct language voice profile
  • Browsers cannot apply correct hyphenation and text rendering rules
  • Search engines may not index pages under the correct language

The Persian (fa) page is the most impactful case — Persian is right-to-left, so the missing dir="rtl" attribute means the browser does not apply RTL layout.

Fix

Added the appropriate lang attribute to all 12 HTML files:

File Change
app/index.html lang="en"
app/az/index.html lang="az"
app/de/index.html lang="de"
app/el/index.html lang="el"
app/es/index.html lang="es"
app/fa/index.html lang="fa" dir="rtl"
app/fr/index.html lang="fr"
app/hi/index.html lang="hi"
app/id/index.html lang="id"
app/nl/index.html lang="nl"
app/ru/index.html lang="ru"
app/zh/index.html lang="zh"

None of the HTML pages declared a lang attribute on the <html> element,
violating WCAG 2.1 criterion 3.1.1 (Language of Page). Without it:
- Screen readers cannot select the correct language voice profile
- Browsers cannot apply correct hyphenation or text rendering
- Search engines may not index pages under the correct language
- The Persian (fa) page had no dir="rtl", breaking RTL text layout

Add the appropriate lang attribute to each page:
- app/index.html: lang="en"
- app/az, de, el, es, fr, hi, id, nl, ru, zh: lang per language code
- app/fa: lang="fa" dir="rtl" (Persian is right-to-left)
@robertodauria
Copy link
Contributor

Thanks for identifying this. The files modified by this PR are being removed as part of #83, which rewrites the codebase from scratch, but the underlying issue persists there - lang is hardcoded to en and not updated dynamically, and dir="rtl" is not handled. We'll make sure to address this in the new code.

We aim to merge #83 next week, which will give contributors a stable, modern base to work from. We'd encourage you to review it and open any future PRs on top of that.

@Kunal1522
Copy link
Contributor Author

Thanks for the review @robertodauria ..i will refrain from adding the changes to core js/css until the refactor of pr #83

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.

HTML pages are missing lang attribute

2 participants