No Code Attached Yet a11y
avatar niosme
niosme
22 Jan 2026

Steps to reproduce the issue

  1. Images dont have and alt text always as it should have and also no width and height specified. This occurs pagespeed errors that could be fixed with ovewrite, but i think its nesecarry to be added in the default module for better accessibility. Even if the param full_name is turned on doesnt fill the alt text.

Also size of the image on better practices is 18x12 and pagespeed suggests a bigger image like 27x18 for the image to be as default size.

Image

In languages module images of languages are missing the alt text and the width and height variables.

Expected result

<img title="English" width="18" height="12" src="/media/mod_languages/images/en_gb.gif" alt="English">

Actual result

<img src="/media/mod_languages/images/en_gb.gif">
or
<img title="English" src="/media/mod_languages/images/en_gb.gif">

Fix

On every occurence of

<?php echo HTMLHelper::_('image', 'mod_languages/' . $language->image . '.gif', $params->get('full_name') ? '' : $language->title_native, null, true); ?>

Should be something like that

<?php echo HTMLHelper::_('image', 'mod_languages/' . $language->image . '.gif', $language->title_native, ['title' => $language->title_native, 'width' => '18', 'height' => '12'], true); ?>

Occurences:

<?php echo HTMLHelper::_('image', 'mod_languages/' . $language->image . '.gif', $params->get('full_name') ? '' : $language->title_native, null, true); ?>

<?php echo HTMLHelper::_('image', 'mod_languages/' . $language->image . '.gif', $params->get('full_name') ? '' : $language->title_native, null, true); ?>

<?php echo HTMLHelper::_('image', 'mod_languages/' . $language->image . '.gif', $params->get('full_name') ? '' : $language->title_native, null, true); ?>

<?php echo HTMLHelper::_('image', 'mod_languages/' . $language->image . '.gif', $language->title_native, ['title' => $language->title_native], true); ?>

<?php echo HTMLHelper::_('image', 'mod_languages/' . $language->image . '.gif', $language->title_native, ['title' => $language->title_native], true); ?>

Maybe that with the params and full name is fine on some cases as it includes it so then it will prevent the Image elements do not have [alt] attributes that are redundant text. but pagespeed throws an error sometimes.

Device and system info

  • What version of Joomla were you using?
    Joomla 6

  • What device were you using? (eg, phone, laptop)
    Mobile Device

  • What web browser were you using? (eg, Chrome, Safari)
    Firefox

  • If you were using assistive technology, please let us know the device or software you were using (eg VoiceOver, JAWS, sip-and-puff device, etc)
    Pagespeed Insights

Additional comments

If you know which WCAG or ATAG criteria this violates, please indicate it here:

avatar niosme niosme - open - 22 Jan 2026
avatar joomla-cms-bot joomla-cms-bot - change - 22 Jan 2026
Labels Added: No Code Attached Yet a11y
avatar joomla-cms-bot joomla-cms-bot - labeled - 22 Jan 2026
avatar niosme niosme - change - 22 Jan 2026
The description was changed
avatar niosme niosme - edited - 22 Jan 2026
avatar niosme niosme - change - 22 Jan 2026
The description was changed
avatar niosme niosme - edited - 22 Jan 2026
avatar niosme niosme - change - 22 Jan 2026
The description was changed
avatar niosme niosme - edited - 22 Jan 2026
avatar 4digitalworld
4digitalworld - comment - 22 Jan 2026

Also size of the image on better practices is 18x12 and pagespeed suggests a bigger image like 27x18 for the image to be as default size.

I posted how to fix this issue here: #27813

Each flag should have multiple images of different sizes for different screens: one image for the default screen, another image for a 2K screen, and also images for 4K and 8K screens.

8K PC monitors are already available, so there should be images for 8K screens in @joomla as well.

https://en.wikipedia.org/wiki/8K_resolution

avatar chaitali-tekdi
chaitali-tekdi - comment - 31 Jan 2026

I have sent PR.
The Languages module (mod_languages) was rendering language flag images without required accessibility and performance attributes. Previously, the output was missing the alt, width, and height attributes, and even when the full_name parameter was enabled, the alt text was not reliably populated, which resulted in PageSpeed Insights warnings and accessibility issues. This has now been fixed by updating the image rendering to always include a meaningful alt and title attribute using the native language name, along with explicit width and height values. This ensures better accessibility compliance, prevents layout shifts, and removes the need for overrides to address PageSpeed or accessibility errors.


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

avatar alikon
alikon - comment - 31 Jan 2026

@chaitali-tekdi what is the pull request number ?

avatar chaitali-tekdi
chaitali-tekdi - comment - 31 Jan 2026

Issue #46743 is pull request number

avatar alikon
alikon - comment - 31 Jan 2026

@chaitali-tekdi no you are referencing to this one wich is an issue and not a pull request

avatar chaitali-tekdi
chaitali-tekdi - comment - 31 Jan 2026

Sorry, this is 46792 pull number

avatar alikon alikon - close - 31 Jan 2026
avatar alikon
alikon - comment - 31 Jan 2026

please test #46792

avatar alikon alikon - change - 31 Jan 2026
Status New Closed
Closed_Date 0000-00-00 00:00:00 2026-01-31 08:45:15
Closed_By alikon

Add a Comment

Login with GitHub to post a comment