No Code Attached Yet a11y
avatar pl71
pl71
24 Mar 2024

Isn't an image next to a menu item decorative only?

Steps to reproduce the issue

  1. Have a menu item and add a Link Image from Menus: Edit Item/link Type
  2. Check page source:

Expected result

<a href="/menu-item-1"><img src="/images/path-to/filename.jpg" alt="" decoding="async">...

Actual result

<a href="/menu-item-1"><img src="/images/path-to/filename.jpg" alt="menu-item-1" decoding="async">...</a>

Device and system info

  • What version of Joomla were you using?
    J 5.0.3

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

  • 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)

Additional comments

As per PageSpeed Insights

Informative elements should aim for short, descriptive alternative text. Alternative text that is exactly the same as the text adjacent to the link or image is potentially confusing for screen reader users, because the text will be read twice.

avatar pl71 pl71 - open - 24 Mar 2024
avatar joomla-cms-bot joomla-cms-bot - change - 24 Mar 2024
Labels Added: No Code Attached Yet a11y
avatar joomla-cms-bot joomla-cms-bot - labeled - 24 Mar 2024
avatar Quy Quy - change - 24 Mar 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-03-24 20:25:47
Closed_By Quy
avatar Quy Quy - close - 24 Mar 2024
avatar Quy
Quy - comment - 24 Mar 2024

Closing per PR #40675. Thanks.

Add a Comment

Login with GitHub to post a comment