Page MenuHomePhorge

a11y: Add lang attribute to <html> element
AcceptedPublic

Authored by aklapper on Sun, Jun 1, 11:47.

Details

Summary

https://www.w3.org/WAI/standards-guidelines/act/rules/b5c3f8/ and
https://dequeuniversity.com/rules/axe-devtools/3.1/html-has-lang
require a lang attribute. It is only possible to set one value.

If the user is logged in, set their "Translation" which they set on /settings/panel/language/, else set to English.

Disadvantage: The translation might be so incomplete that they'll stick get most strings in English while their screenreader software expects a different language.

Ref T16072

Test Plan

Open a Phorge page logged in and logged out, look at its <html> header.
Change to a different "Translation" on /settings/panel/language/, repeat.

Diff Detail

Repository
rP Phorge
Branch
a11y-T16072-11 (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 2044
Build 2044: arc lint + arc unit