Support-Forum

jDownloads for Joomla 3.x => jDownloads 3.9 => Topic started by: sichapman on 16.11.2021 16:22:18

Title: Accessibility help
Post by: sichapman on 16.11.2021 16:22:18
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.
Title: Re: Accessibility help
Post by: Arno on 17.11.2021 23:05:27
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.
Title: Re: Accessibility help
Post by: sichapman on 18.11.2021 11:59:27
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.
Title: Re: Accessibility help
Post by: sichapman on 19.11.2021 10:54:19
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[/url]

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.
Title: Re: Accessibility help
Post by: ColinM on 22.11.2021 14:33:20
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
Title: Re: Accessibility help
Post by: ColinM on 24.11.2021 13:14:12
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
Code: [Select]
string  alt="'.substrthere are about 20 instances.
For example  in com_jdownloads\site\views\download\tmpl\default.php you will find
Code: [Select]
$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
Code: [Select]
'.substr($item->title,0,-4).'to give, in this example,
Code: [Select]
$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
Code: [Select]
$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
Title: Re: Accessibility help
Post by: sichapman on 30.12.2021 16:18:52
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.
Title: Re: Accessibility help
Post by: sichapman on 30.12.2021 16:27:37
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.