jDownloadsownloads.com
Advertisement
 

Author Topic: Accessibility help  (Read 292 times)

0 Members and 1 Guest are viewing this topic.

Offline sichapman

  • Newbie
  • *
  • Posts: 3
Accessibility help
« 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.

Offline Arno

  • Administrator
  • ***
  • Posts: 12.400
    • jDownloads.com
Re: Accessibility help
« Reply #1 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.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!

Offline sichapman

  • Newbie
  • *
  • Posts: 3
Re: Accessibility help
« Reply #2 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.

Offline sichapman

  • Newbie
  • *
  • Posts: 3
Re: Accessibility help
« Reply #3 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.

Offline ColinM

  • Moderator
  • *
  • Posts: 4.157
Re: Accessibility help
« Reply #4 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

Offline ColinM

  • Moderator
  • *
  • Posts: 4.157
Re: Accessibility help
« Reply #5 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