View Issue Details

This issue affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
20893Bug reportsAccessibilitypublic2026-11-26 11:40
ReporterDenisChenu Assigned Tosaraj  
PrioritynoneSeverityminor 
Status assignedResolutionopen 
Product Version7.11.x 
Summary20893: Language names in the language changer are not marked with their language (WCAG 3.1.2)
Description

The language changer shows each language as nativedescription - description, for example "Français - French" on an English page (see getLanguageChangerLabel() in application/helpers/frontend_helper.php). The native name has no lang attribute. A screen reader therefore reads "Français", "Deutsch (Du)" or "简体中文" with the voice and pronunciation rules of the page language. The name can be garbled or not read at all, so the respondent can't find their own language.

Right-to-left native names, such as Arabic or Hebrew, also lack dir when they are shown on a left-to-right page.

Steps To Reproduce

Steps to reproduce

  1. Create a survey with several languages, for example English, French and German. (doc survey is great for this)
  2. Open it in English with the vanilla or fruity_twentythree theme, and show the language changer (top menu or select).
  3. Inspect the language entries, or listen to them with a screen reader (NVDA, VoiceOver).

Actual result

Top menu:

<a href="#" data-limesurvey-lang="fr" class="dropdown-item ls-language-link">Français - French</a>

Select:

<option value="fr">Français - French</option>

Nothing marks the change of language.

Expected result

The native name carries its own language, and the translated name stays in the page language:

<span lang="fr">Français</span> - French
TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)7.12.1
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant
Git branch / Pull Request URLN/A

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2026-11-24 17:05

developer   ~87946

Suggested fix

  • Give the views the native name and the translated name separately, instead of the single concatenated label.
  • Take the lang value from getHtmlLangAttributeValue(), which already returns the BCP 47 code used for <html lang>. Internal codes such as de-informal are not valid lang values.
  • Add dir="rtl" to the native name of right-to-left languages.
  • In the <select>, a <span> cannot go inside <option>. Put lang on the <option> itself, which covers its whole text, translated part included. Showing only the native name in that option is cleaner.

References

Issue History

Date Modified Username Field Change
2026-11-24 17:05 DenisChenu New Issue
2026-11-24 17:05 DenisChenu Note Added: 87946
2026-11-24 17:05 DenisChenu Bug heat 0 => 2
2026-11-24 17:28 stefankotes Assigned To => twilllig
2026-11-24 17:28 stefankotes Status new => assigned
2026-11-26 10:59 stefankotes Assigned To twilllig => saraj
2026-11-26 11:01 user394819 Bug heat 2 => 4
2026-11-26 11:40 stefankotes Bug heat 4 => 2