No Code Attached Yet bug
avatar sertlan
sertlan
3 May 2026

What happened?

Please add the "Link Image Alt Text" field to the "Link Type" tab of the menu item.

The "Link Image" field is filled in.
The "Link Image Alt Text" field is missing.
As a result, the alt attribute in the <img> tag is empty.

Version

5.4

Expected result

"Link Image Alt Text" field is present.

Actual result

"Link Image Alt Text" field is missing.

System Information

Joomla! 5.4.5

Additional Comments

No response

avatar sertlan sertlan - open - 3 May 2026
avatar sertlan sertlan - change - 3 May 2026
Labels Added: bug
avatar sertlan sertlan - labeled - 3 May 2026
avatar joomla-cms-bot joomla-cms-bot - change - 3 May 2026
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 3 May 2026
avatar chmst
chmst - comment - 3 May 2026

This is intendedd behaviour.
If there is an image and a text, the image is decorative and hidden from screenreaders.
If there is no text, only the image, then the non-sighted user gets the link text as visually-hidden and the alt-text is empty.

avatar sertlan
sertlan - comment - 3 May 2026

Google PageSpeed Insights and Bing Webmaster consider this an error.

avatar chmst
chmst - comment - 3 May 2026

Could you pleas give link to the problem or a screenshot? Do you have an extension for your menu?

avatar sertlan
sertlan - comment - 3 May 2026

Could you pleas give link to the problem or a screenshot?

<a href="/"><img src="/images/logo.svg" alt=""></a>

Do you have an extension for your menu?

No.

avatar brianteeman
brianteeman - comment - 3 May 2026

this is what i get

Image
avatar chmst chmst - change - 6 May 2026
Status New Closed
Closed_Date 0000-00-00 00:00:00 2026-05-06 07:24:39
Closed_By chmst
avatar chmst chmst - close - 6 May 2026
avatar chmst
chmst - comment - 6 May 2026

@sertlan in your code snippet <a href="/"><img src="/images/logo.svg" alt=""></a> the alt attribute is present.
The link contains a visually-hidden text as you see in #47727 (comment)
I checked this with Google Page speed insights - no error.

I close this for now. If you can give a link to your site so we can check it, we can re-open.

avatar sertlan
sertlan - comment - 6 May 2026

@chmst The alt attribute is present, but it is empty.

avatar brianteeman
brianteeman - comment - 6 May 2026

an empty alt attribute is the correct way to mark an image as decorative

avatar sertlan
sertlan - comment - 6 May 2026

an empty alt attribute is the correct way to mark an image as decorative

@brianteeman Google PageSpeed ​​Insights says:
Error: Link text is indistinguishable to screen readers
Link text (and alternate text for images, when used as links) that is discernible, unique, and focusable improves the navigation experience for screen reader users.
Failing Elements:
<a href="/" tabindex="0">

Bing Webmaster says:
WARNING : Alt attribute for images is missing

avatar brianteeman
brianteeman - comment - 6 May 2026
avatar sertlan
sertlan - comment - 6 May 2026
avatar brianteeman
brianteeman - comment - 6 May 2026

no - please do what you were asked multiple times now and provide a link to your site so we can see the problem as we cannot replicate it localy

avatar sertlan
sertlan - comment - 6 May 2026

@brianteeman https://aforizm.org/ The first menu item "Test menu item" in the right column

avatar sertlan
sertlan - comment - 6 May 2026

https://aforizm.org/ The first menu item in the right column

avatar sertlan
sertlan - comment - 6 May 2026

@brianteeman https://aforizm.org/ The first menu item in the right column

avatar brianteeman
brianteeman - comment - 6 May 2026
Image

that is exactly what it should be

the image is decorative so its marked as decorative with the empty alt attribute

Image
avatar sertlan
sertlan - comment - 6 May 2026

@brianteeman Google PageSpeed ​​Insights says:
Error: Link text is indistinguishable to screen readers
Link text (and alternate text for images, when used as links) that is discernible, unique, and focusable improves the navigation experience for screen reader users.
Failing Elements:
<a href="/" class="test-menu-item" tabindex="0">

Bing Webmaster says:
WARNING : Alt attribute for images is missing

avatar brianteeman
brianteeman - comment - 6 May 2026

this automated test is wrong

avatar sertlan
sertlan - comment - 7 May 2026

this automated test is wrong

@brianteeman This opinion is incorrect because errors and warnings in these tests negatively impact sites' rankings in Google and Bing search results.

avatar sertlan
sertlan - comment - 7 May 2026

I close this for now. If you can give a link to your site so we can check it, we can re-open.

@chmst #47727 (comment)

avatar chmst
chmst - comment - 7 May 2026

@sertlan thank you for sharing the link. In this case, it is an a11y issue.

However, your Template ads the images with CSS, not as image in the joomla link. With css it is not posible to add an alt text.
If you use images instead of css for your menu, Joomla kakes correct alt texts.

Image
avatar chmst
chmst - comment - 7 May 2026

@sertlan thank you for sharing the link. In this case, it is an a11y issue.

However, your Template ads the images with CSS, not as image in the joomla link. With css it is not posible to add an alt text.
If you use images instead of css for your menu, Joomla generates correct alt texts.

Image
avatar sertlan
sertlan - comment - 7 May 2026

@chmst The first menu item in the right column

avatar sertlan
sertlan - comment - 7 May 2026

@chmst The first menu item "Test menu item" in the right column

avatar brianteeman
brianteeman - comment - 8 May 2026

I found the problem and its coming from the css in your template

The css for the class visually-hidden is incorrect

Image

By setting it to display:none you are not just visually hiding it you are also removing it completely from the accessibility tree. As a result the tests that you used correctly identified this a a link with just an image and nothing else.

I had assumed when I first looked at your site that you were using the standard css for the class visually-hidden so I was incorrect in saying that the test is wrong.

All you have to do is to fix your own css for the class visually-hidden. You can copy it from the cassiopeia template

avatar brianteeman
brianteeman - comment - 8 May 2026

I found the problem and its coming from the css in your template

The css for the class visually-hidden is incorrect

Image

By setting it to display:none you are not just visually hiding it you are also removing it completely from the accessibility tree. As a result the tests that you used correctly identified this a a link with just an image and nothing else.

I had assumed when I first looked at your site that you were using the standard css for the class visually-hidden so I was incorrect in saying that the test is wrong.

All you have to do is to fix your own css for the class visually-hidden. You can copy it from the cassiopeia template

avatar sertlan
sertlan - comment - 8 May 2026

@brianteeman You're absolutely right. Now this error does not appear in Google PageSpeed Insights. Thank you very much!

Add a Comment

Login with GitHub to post a comment