RTC a11y bug PR-5.2-dev Pending

User tests: Successful: Unsuccessful:

avatar chmst
chmst
29 May 2023

Pull Request for Issue # .

Summary of Changes

In the menu layouts menus can have an image followed by an text. Alt-text for images are generated equal to the menuitem title. If the menutype is a link, this is an a11y issue, in other cases it is useless.

This PR replaces the alt text by an empty alt-text for all menutypes.

Testing Instructions

Code inspect and sourcecode inspect.
Or use a tool like IBM accessible audit in your browser and check your menus with images.

Actual result BEFORE applying this Pull Request

grafik

Expected result AFTER applying this Pull Request

grafik

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • x] No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • [x No documentation changes for manual.joomla.org needed

avatar joomla-cms-bot joomla-cms-bot - change - 29 May 2023
Category Modules Front End Templates (site)
avatar chmst chmst - open - 29 May 2023
avatar chmst chmst - change - 29 May 2023
Status New Pending
avatar brianteeman
brianteeman - comment - 29 May 2023

LGTM

avatar chmst chmst - change - 29 May 2023
The description was changed
avatar chmst chmst - edited - 29 May 2023
avatar chmst chmst - change - 29 May 2023
The description was changed
avatar chmst chmst - edited - 29 May 2023
avatar chmst chmst - change - 29 May 2023
The description was changed
avatar chmst chmst - edited - 29 May 2023
avatar chmst chmst - change - 29 May 2023
Labels Added: a11y bug PR-4.3-dev
avatar Quy
Quy - comment - 24 Jun 2023

When Display Menu Item Title is disabled, then won't it be an a11y issue without the alt text?

avatar chmst
chmst - comment - 24 Jun 2023

No, as there is the menu item text , but hidden for sighted users
<span class="visually-hidden">' . $item->title . '</span>'

avatar Quy
Quy - comment - 24 Jun 2023

But this is not the case as seen below:

<li class="nav-item item-101"><a href="/joomla-cms-4.3-dev/index.php/home" ><img src="/joomla-cms-4.3-dev/images/joomla_black.png" alt="" width="225" height="50" loading="lazy"></a></li>

avatar chmst
chmst - comment - 25 Jun 2023

Thank you for testing - will fix this asap

avatar chmst chmst - change - 26 Aug 2023
Labels Added: ?
avatar ceford ceford - test_item - 26 Sep 2023 - Tested successfully
avatar ceford
ceford - comment - 26 Sep 2023

I have tested this item ✅ successfully on b63b611

Using axe DevTools the menu image was flagged as Alternative text of images should not be repeated as text. With the patch that flag disappeared.


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

avatar HLeithner
HLeithner - comment - 30 Sep 2023

This pull request has been automatically rebased to 4.4-dev.

avatar pl71
pl71 - comment - 30 Mar 2024

So any news here? Still open. Btw you may add "width" & "height" attributes to this <img> as well.

avatar hans2103
hans2103 - comment - 30 Mar 2024

So any news here? Still open. Btw you may add "width" & "height" attributes to this <img> as well.

The attributes width and height are not required for an img element.
The preserve the required space on a html page one can also use aspect-ratio

@chmst can you fix the error "This branch is out-of-date with the base branch" by merging most resent branch 4.4-dev into it?

avatar Quy Quy - change - 30 Mar 2024
Labels Added: PR-4.4-dev
Removed: ? PR-4.3-dev
avatar pl71
pl71 - comment - 30 Mar 2024

The attributes width and height are not required for an img element. The preserve the required space on a html page one can also use aspect-ratio

@hans2103 Many things are not required, but I want a 100 score on PageSpeed Insights. :)

avatar hans2103
hans2103 - comment - 30 Mar 2024

@pl71 consider creating a jlayout image to render the image using a cdn like imagekit and serve the image with the correct width and height

avatar pl71
pl71 - comment - 31 Mar 2024

Probably some day. But for one icon only...

avatar HLeithner HLeithner - change - 24 Apr 2024
Title
Remove alt-text for menuItem with image and title
[4.4] Remove alt-text for menuItem with image and title
avatar HLeithner HLeithner - edited - 24 Apr 2024
avatar drmenzelit drmenzelit - change - 10 Aug 2024
Status Pending Ready to Commit
Build 4.3-dev 4.4-dev
avatar laoneo
laoneo - comment - 29 Aug 2024

This one here is not RTC, it has only one test.

avatar chmst chmst - change - 29 Aug 2024
Labels Added: RTC
avatar laoneo laoneo - change - 30 Aug 2024
Status Ready to Commit Pending
avatar laoneo
laoneo - comment - 30 Aug 2024

Back to pending as it has only one test


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

avatar chmst chmst - change - 30 Aug 2024
Labels Removed: RTC
avatar hans2103 hans2103 - test_item - 30 Aug 2024 - Tested successfully
avatar hans2103
hans2103 - comment - 30 Aug 2024

I have tested this item ✅ successfully on 87b1361


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

avatar drmenzelit drmenzelit - change - 5 Sep 2024
Labels Added: Updates Requested
avatar chmst chmst - change - 5 Sep 2024
Labels Removed: Updates Requested
avatar HLeithner
HLeithner - comment - 15 Nov 2024

This pull request has been automatically rebased to 5.2-dev.

avatar HLeithner HLeithner - change - 15 Nov 2024
Title
[4.4] Remove alt-text for menuItem with image and title
[5.2] Remove alt-text for menuItem with image and title
avatar HLeithner HLeithner - edited - 15 Nov 2024
avatar pe7er pe7er - test_item - 18 Jan 2025 - Tested successfully
avatar pe7er
pe7er - comment - 18 Jan 2025

I have tested this item ✅ successfully on 731bba0

Works fine. It adds an empty ALT to the purely decorative menu item image


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

avatar pe7er pe7er - change - 18 Jan 2025
Status Pending Ready to Commit
avatar pe7er
pe7er - comment - 18 Jan 2025

RTC


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

avatar rdeutz rdeutz - change - 18 Jan 2025
Labels Added: RTC PR-5.2-dev
Removed: PR-4.4-dev
avatar rdeutz rdeutz - change - 18 Jan 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-01-18 14:04:56
Closed_By rdeutz
avatar rdeutz rdeutz - close - 18 Jan 2025
avatar rdeutz rdeutz - merge - 18 Jan 2025

Add a Comment

Login with GitHub to post a comment