Pending

User tests: Successful: Unsuccessful:

avatar chaitali-tekdi
chaitali-tekdi
31 Jan 2026

Issue Summary

The Languages module (mod_languages) was rendering language flag images without required accessibility attributes.

What was wrong earlier

tags were missing:

alt attribute (accessibility issue)

width and height attributes (performance / PageSpeed issue)

Even when the full_name parameter was enabled, the alt text was either:

empty, or

not rendered at all

This caused:

PageSpeed Insights warnings

Accessibility (WCAG) violations

Layout shift risk due to missing image dimensions

Example of incorrect output:


What has been fixed

Added proper alt text using the native language title

Added title, width, and height attributes to the image output

Ensured accessibility compliance and better performance by default

No override is required anymore to fix PageSpeed or accessibility errors

Updated code implementation

image . '.gif', $language->title_native, [ 'title' => $language->title_native, 'width' => '18', 'height' => '12' ], true ); ?>

Result

Expected output is now correctly rendered as:

English

  1. Better accessibility
  2. No PageSpeed errors
  3. Correct default behavior in core module
avatar chaitali-tekdi chaitali-tekdi - open - 31 Jan 2026
avatar chaitali-tekdi chaitali-tekdi - change - 31 Jan 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 31 Jan 2026
Category Modules Front End
avatar Pranita-Zalli Pranita-Zalli - test_item - 31 Jan 2026 - Not tested
avatar Pranita-Zalli Pranita-Zalli - test_item - 31 Jan 2026 - Tested successfully
avatar Pranita-Zalli
Pranita-Zalli - comment - 31 Jan 2026

I have tested this item ✅ successfully on 700e7f9

I have tested this item ✅ successfully on 5.4-dev


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46792.

avatar RickR2H RickR2H - test_item - 31 Jan 2026 - Tested successfully
avatar RickR2H
RickR2H - comment - 31 Jan 2026

I have tested this item ✅ successfully on 700e7f9

Not the most charming solution but good for now I guess.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46792.

avatar RickR2H RickR2H - change - 31 Jan 2026
Status Pending Ready to Commit
avatar RickR2H
RickR2H - comment - 31 Jan 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46792.

avatar brianteeman
brianteeman - comment - 31 Jan 2026

Sorry but this PR is completely wrong. In the dropdown mode of the language selector the flags are purely decorative and the current code is correct. Adding an alt attribute serves no purpose and should not be used on decorative images. Additionally setting a title on the image so that the language name is displayed on hover serves no purpose as the language name is displayed already.

Please remove the RTC as it should not be merged in its current form

Add a Comment

Login with GitHub to post a comment