Accessibility Issues

  • Posts: 8
  • Thank you received: 2
  • Hikashop Business
4 years 1 month ago #328752

-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.23
-- PHP version -- : 7.2

I am trying to make my website friendly for people with disabilities.

Following the WCAG 2.0 (Level AA) standards i corrected most of the errors but i have a problem with Hikashop.

On the products list view, at the bottom there is a select input box for filtering how many products are displayed.
This is in view: product_listing_div.php
and more specific in this code:

<?php echo str_replace('&tmpl=raw','', $this->pagination->getListFooter($this->params->get('limit'))); ?>
that it gets translated in the frontend like this:
<div class="list-footer">

<div class="limit">Show #<select id="limit" name="limit" class="chzn-done inputbox" size="1" style="width:70px" onchange="this.form.submit()">
	<option value="12" selected="selected">12</option>
	<option value="24">24</option>
	<option value="36">36</option>
	<option value="48">48</option>
	<option value="60">60</option>
	<option value="0">all</option>
</select>

</div>
<div class="pagination">
<ul class="pagination-list"><li class="disabled"><a><span class="icon-first"></span></a></li><li class="disabled"><a><span class="icon-previous"></span></a></li><li class="active hidden-phone"><a>1</a></li><li class="hidden-phone"><a title="2" href="https://www.mysiteblahblah.com?limitstart=12&amp;limit=12" class="pagenav">2</a></li><li class="hidden-phone"><a title="3" href="https://www.mysiteblahblah.com?limitstart=24&amp;limit=12" class="pagenav">3</a></li><li class="hidden-phone"><a title="4" href="https://www.mysiteblahblah.com?limitstart=36&amp;limit=12" class="pagenav">4</a></li><li class="hidden-phone"><a title="5" href="https://www.mysiteblahblah.com?limitstart=48&amp;limit=12" class="pagenav">...</a></li><li class="hidden-phone"><a title="6" href="https://www.mysiteblahblah.com?limitstart=60&amp;limit=12" class="pagenav">6</a></li><li><a title="Next" href="https://www.mysiteblahblah.com?limitstart=12&amp;limit=12" class="pagenav"><span class="icon-next"></span></a></li><li><a title="Previous" href="https://www.mysiteblahblah.com?limitstart=60&amp;limit=12" class="pagenav"><span class="icon-last"></span></a></li></ul>
<input type="hidden" name="limitstart" value="0">
</div>
</div>

My problem is that according to WCAG 2.0 (Level AA) standards, select element cannot contain onchange attribute.

I know that this cannot be changed from you because thats how hikashop works and i am fine by that. But how can i remove the select ?
I cannot find how to edit
<?php echo str_replace('&tmpl=raw','', $this->pagination->getListFooter($this->params->get('limit'))); ?>

Please Log in or Create an account to join the conversation.

  • Posts: 83404
  • Thank you received: 13498
  • MODERATOR
4 years 1 month ago #328767

Hi,

Well, the pagination is done by the file administrator/components/com_hikashop/helpers/pagination.php which inherits from Joomla's pagination system, which can be overridden by your template.
The first thing to check is whether you have the file templates/YOUR_TEMPLATE/html/pagination.php
If you do, then, check if that file has the function pagination_list_footer($list)
This function is basically what is called by the $this->pagination->getListFooter() function call to return the HTML of that area.
help.hubzero.org/documentation/1.2.2/web.../templates/overrides (at the end of the page)
So there, you can modify it to not use

$list['limit']
where the HTML of the select is waiting to be used.
If the pagination.php doesn't exist, then it means you're using the default output of HikaShop / Joomla. You can always create that pagination.php file yourself and implement in it the pagination_list_footer function.

Last edit: 3 years 9 months ago by nicolas.
The following user(s) said Thank You: epafos

Please Log in or Create an account to join the conversation.

Time to create page: 0.057 seconds
Powered by Kunena Forum