Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.2] Remove alt-text for menuItem with image and title #40675

Merged
merged 13 commits into from
Jan 18, 2025

Conversation

chmst
Copy link
Contributor

@chmst chmst commented May 29, 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

@chmst chmst added a11y Accessibility bug labels May 29, 2023
@brianteeman
Copy link
Contributor

LGTM

Copy link
Contributor

@hans2103 hans2103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hans2103 hans2103 mentioned this pull request May 30, 2023
4 tasks
@Quy
Copy link
Contributor

Quy commented Jun 24, 2023

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

@chmst
Copy link
Contributor Author

chmst commented Jun 24, 2023

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

@Quy
Copy link
Contributor

Quy commented Jun 24, 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>

@chmst
Copy link
Contributor Author

chmst commented Jun 25, 2023

Thank you for testing - will fix this asap

@Quy Quy added the Updates Requested Indicates that this pull request needs an update from the author and should not be tested. label Jul 26, 2023
@ceford
Copy link
Contributor

ceford commented Sep 26, 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.

@Quy Quy removed the Updates Requested Indicates that this pull request needs an update from the author and should not be tested. label Sep 29, 2023
@HLeithner HLeithner changed the base branch from 4.3-dev to 4.4-dev September 30, 2023 22:43
@HLeithner
Copy link
Member

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

@drmenzelit drmenzelit self-assigned this Oct 24, 2023
@laoneo
Copy link
Member

laoneo commented Aug 29, 2024

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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Aug 29, 2024
@laoneo
Copy link
Member

laoneo commented Aug 30, 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.

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Aug 30, 2024
@hans2103
Copy link
Contributor

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.

@Quy Quy added the Updates Requested Indicates that this pull request needs an update from the author and should not be tested. label Sep 3, 2024
@Quy Quy removed the Updates Requested Indicates that this pull request needs an update from the author and should not be tested. label Sep 5, 2024
@HLeithner HLeithner changed the base branch from 4.4-dev to 5.2-dev November 15, 2024 13:21
@HLeithner
Copy link
Member

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

@HLeithner HLeithner changed the title [4.4] Remove alt-text for menuItem with image and title [5.2] Remove alt-text for menuItem with image and title Nov 15, 2024
@pe7er
Copy link
Contributor

pe7er commented Jan 18, 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.

@pe7er
Copy link
Contributor

pe7er commented Jan 18, 2025

RTC


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

@pe7er pe7er removed the PR-5.2-dev label Jan 18, 2025
@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jan 18, 2025
@rdeutz rdeutz merged commit b337054 into joomla:5.2-dev Jan 18, 2025
3 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jan 18, 2025
@richard67 richard67 added this to the Joomla! 5.2.4 milestone Jan 18, 2025
@chmst chmst deleted the a11y-menu-module-alt branch January 18, 2025 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.