fix: add lang attribute to all HTML pages for accessibility#110
Closed
Kunal1522 wants to merge 1 commit intom-lab:mainfrom
Closed
fix: add lang attribute to all HTML pages for accessibility#110Kunal1522 wants to merge 1 commit intom-lab:mainfrom
Kunal1522 wants to merge 1 commit intom-lab:mainfrom
Conversation
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)
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 - 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. |
Contributor
Author
|
Thanks for the review @robertodauria ..i will refrain from adding the changes to core js/css until the refactor of pr #83 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #111
None of the HTML pages declare a
langattribute on the<html>element, violating WCAG 2.1 criterion 3.1.1 (Language of Page).Without it:
The Persian (
fa) page is the most impactful case — Persian is right-to-left, so the missingdir="rtl"attribute means the browser does not apply RTL layout.Fix
Added the appropriate
langattribute to all 12 HTML files:app/index.htmllang="en"app/az/index.htmllang="az"app/de/index.htmllang="de"app/el/index.htmllang="el"app/es/index.htmllang="es"app/fa/index.htmllang="fa" dir="rtl"app/fr/index.htmllang="fr"app/hi/index.htmllang="hi"app/id/index.htmllang="id"app/nl/index.htmllang="nl"app/ru/index.htmllang="ru"app/zh/index.htmllang="zh"