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.
5.4
"Link Image Alt Text" field is present.
"Link Image Alt Text" field is missing.
Joomla! 5.4.5
No response
| Labels |
Added:
bug
|
||
| Labels |
Added:
No Code Attached Yet
|
||
Google PageSpeed Insights and Bing Webmaster consider this an error.
Could you pleas give link to the problem or a screenshot? Do you have an extension for your menu?
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.
| Status | New | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-05-06 07:24:39 |
| Closed_By | ⇒ | chmst |
@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.
an empty alt attribute is the correct way to mark an image as decorative
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
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
@brianteeman https://aforizm.org/ The first menu item "Test menu item" in the right column
https://aforizm.org/ The first menu item in the right column
@brianteeman https://aforizm.org/ The first menu item in the right column
@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
this automated test is wrong
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.
I close this for now. If you can give a link to your site so we can check it, we can re-open.
@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.
@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.
I found the problem and its coming from the css in your template
The css for the class visually-hidden is incorrect
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
I found the problem and its coming from the css in your template
The css for the class visually-hidden is incorrect
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
@brianteeman You're absolutely right. Now this error does not appear in Google PageSpeed Insights. Thank you very much!
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.