No Code Attached Yet bug
avatar DelPoint
DelPoint
1 Apr 2022

Steps to reproduce the issue

  1. Go to Global Configuration -> Component -> Contacts -> Icon panel
  2. Set Settings drop-down list to Icons
  3. Select any picture for Custom Email Icon
  4. Create a contact, add every contact datas (name, address, email, etc.)
  5. Display the created contact using any kind of template (preferable Cassiopeia) which doesn't use template override for the file "components/com_contact/tmpl/contact/default_address.php"
  6. Check the alt text of the selected image of email

Expected result

Alt text should display the word Email instead of the key CON_CONTACT_EMAIL of the missing lang string.

Actual result

image

System information (as much as possible)

Joomla! 4.1.2., but earlier versions are also affected.

Additional comments

Lang file "com_contact.ini" needs to be updated & translated with a new string COM_CONTACT_EMAIL="Email"

avatar DelPoint DelPoint - open - 1 Apr 2022
avatar joomla-cms-bot joomla-cms-bot - change - 1 Apr 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 1 Apr 2022
avatar DelPoint
DelPoint - comment - 1 Apr 2022

Hm. Looks like this is a duplicate of #36957.

avatar DelPoint DelPoint - change - 1 Apr 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-04-01 02:50:16
Closed_By DelPoint
avatar DelPoint DelPoint - close - 1 Apr 2022
avatar DelPoint
DelPoint - comment - 1 Apr 2022

Well, the #36957 is a very similar issue, but not this case. In this case custom icons are added by selecting images, AND the alt text is still wrong, because the code inserting the image uses COM_CONTACT_EMAIL key.

avatar DelPoint DelPoint - change - 1 Apr 2022
Status Closed New
Closed_Date 2022-04-01 02:50:16
Closed_By DelPoint
avatar DelPoint DelPoint - reopen - 1 Apr 2022
avatar DelPoint
DelPoint - comment - 1 Apr 2022

It seems to me COM_CONTACT_EMAIL is used in /com_contact/src/View/Contact/HtmlView.php only.

avatar infograf768
infograf768 - comment - 1 Apr 2022

Confirmed

HTMLHelper::_('image', $item->params->get('icon_email', ''), Text::_('COM_CONTACT_EMAIL'), false)

2 possible solutions: use the JGLOBAL_EMAIL or add _LABEL as done in #36957

avatar brianteeman
brianteeman - comment - 1 Apr 2022

None of those icons should have an ALT description at all as they are purely decorative so they should be alt=""

avatar DelPoint
DelPoint - comment - 1 Apr 2022

@brianteeman Well, then #36976 was pointless, and both
components/com_contact/tmpl/contact/default_address.php
and
components/com_contact/src/View/Contact/HtmlView.php
...must be edited/fixed too, plus we can remove the already added lang strings from _com_contact.ini used by these 2 files, I guess.

On the other hand: ALT can be helpful (decorative img or not), as that can be used if something went wrong with the images - e.g. you are using an img file with space(s) in its name: just test it, it will produce invalid SRC value in IMG tag (another bug BTW in HtmlView.php).

avatar chmst
chmst - comment - 3 Apr 2022

@DelPoint this is an abuse of the alt text, unfortunately it was used this way in the past.

Today we know that Alt texts give information for blind users, they are read by screen readers.
No blind user must hear an announcement like "image DGB-78589980988-int-1000x456.png".

avatar chmst chmst - change - 17 Feb 2023
Labels Added: bug
avatar chmst chmst - labeled - 17 Feb 2023

Add a Comment

Login with GitHub to post a comment