News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

Accessibility help

Started by sichapman, 16.11.2021 16:22:18

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sichapman

Hi I have recently installed JDownloads into a government website. which has to now conform to Accessibility standards.

I have 2 main issues at present which i think are really easy to fix, if someone could point me in the right direction.

on the downloads layout

1. i need to set the alt text of the file icon to "" as this icon is simply for decoration. setting the alt text via the file name of the icon still fails compliance.

2. using the direct download url has a title text of "Download" this is too brief and needs changing to the name of the file download, or removing altogether (ideally)

is there a way of getting to the {placehoder} code so i can make these modifications?

thanks for any help.
  •  

Arno

Hi,
I think the easiest way could be to create an override.

Do you use the jDownloads extension with all default settings for the frontend view (categories, category, download details, summary)?
In this case you must create for every view a override and modify the corresponding tmpl/default.php file.

Do you have you experiences with the Joomla override functionality? When not, you should at first take a look at a tutorial video.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

sichapman

Thanks for the reply. i have used overrides in the past, but i dont know JDownloads and what requires overriding?
i can confirm im using the default layouts. I just need to know what code requires removing to strip out the title text of the links, and alt text of the file icons. it should pass the check once this is done.
  •  

sichapman

Here are the snippets of code from the web browser inspect console.

<img class="jd_filetyp_icon" loading="lazy" align="top" width="38" height="38" border="1" alt="pdf-6" src="https://mywebsite/images/jdownloads/fileimages/flat_1/pdf.png">

so i need to change the alt="pdf-6" to alt="" i have created overrides for the \views\download and views\downloads removed all the code within the " " but the alt text is still present. so i went though all the views removed every single alt text code and its still showing, so i backed upo the site and removed the overrides and edited the original default.php files and the alt text still loads....

where is this code located within the install directory on joomlas.

i havent yet started to locate the title text which is in the code below. i need to add code so the title text is changed from "download" to the name of the download. in this example its "Application form PDF- Acrobat"

<a target="_blank" href="/component/jdownloads/?task=download.send&amp;id=6&amp;catid=6&amp;m=0&amp;Itemid=435" title="Download" class="jd_download_url">Application form PDF- Acrobat</a>

i feel this is a simple fix i just cant find the code i need to change within the install directory.

Appreciate you help.
thanks.
  •  

ColinM

Hi

Which version of jD are you using?  I have updated many items for WCAG compliance, particularly the alt= bit in images
But not for example in the img for  New as I thougt they were not adjacent so were OK

Would be helpful if you could identify specific locations/images that are causing you a challengeWill send you a PM (Private Mesage)
Colin
Colin M
  •  

ColinM

HiWhat are you using to check for WCAG compliance, which includes the alt item ?
I have been using WAVE from https://wave.webaim.org/ available free for  Firefox,  Chrome (Google) and EdgeMy understanding is that alt=""  is not compliant with WCAG

The relevant code is in the various default.php files in the "views" such as
\components\com_jdownloads\views\download\tmpl\default.php  The actual content varies so the search would be for the string  alt="'.substrthere are about 20 instances.
For example  in com_jdownloads\site\views\download\tmpl\default.php you will find
$this->itempic = '<img src="'.$file_pic_folder.$item->file_pic.'" style="text-align:top;border:0px;" width="'.$fpicsize.'" height="'.$fpicsize_height.'"  alt="'.substr($item->title,0,-4).'" /> ';
Modifications of those sources are the basis of the overrides you will need
If you just want a blank in the alt then remove the section '.substr($item->title,0,-4).'to give, in this example,
$this->itempic = '<img src="'.$file_pic_folder.$item->file_pic.'" style="text-align:top;border:0px;" width="'.$fpicsize.'" height="'.$fpicsize_height.'"  alt="" /> ';

If you wish to use the title then$this->itempic = '<img src="'.$file_pic_folder.$item->file_pic.'" style="text-align:top;border:0px;" width="'.$fpicsize.'" height="'.$fpicsize_height.'"  alt="'.$item->title.'" /> ';

Colin
Colin M
  •  

sichapman

Thanks for you help with this Colin, im using version 3.9.8.2

I'm trying to locate the alt text for:

<img class="jd_filetyp_icon" src="https://www.erewash.gov.uk/images/jdownloads/fileimages/flat_1/pdf.png" loading="lazy" align="top" width="38" height="38" border="1" alt="pdf-80">

i have changed all the alt text for each of the views default.php to null ie alt="" as icons are classed as decorative and dont need alt text. However im still seeing the alt code above. i.e alt="pdf-80" etc on the icon for each download after making the alterations in your last post.

Any ideas what i may have missed.

thanks.
  •  

sichapman

I found where i went wrong, i missed one of the PHP files, and all seems to be working now.
The Alt text is now removed, so hopefully this will pass our external accessibility audit.
Thanks for your help.
  •