lemoynelibrary / lemoyne

Files used in setting up new web design in LibGuides v2 and elsewhere
5 stars 1 forks source link

Accessibility warning on the "Back to top" button in LibGuides #47

Closed tomkeays closed 4 years ago

tomkeays commented 4 years ago

The aXe accessibility auditing browser plugin throws a warning on the "Back to top" button in LibGuides.

image

This button is added by the system. We don't have privileges to alter the code. Here's the code:

<a href="javascript:void(0);" onclick="jQuery('html, body').animate({scrollTop: 0}, 750);" 
    title="Back to Top" aria-label="Back to Top" aria-hidden="true">

According to the warning, since it is a focusable element (<a>), it either shouldn't have the aria-hidden="true" attribute, or you should also addtabindex="-1" to the element. It looks like it is the last element on the page you can tab to using the keyboard, so adding the tabindex="-1" attribute would remove it from the tab order, if I understand correctly.

Springshare needs to make a determination which course is the best one.

tomkeays commented 4 years ago

It turns out the code for the "Back to top" is coded into page templates. Admin > Look & Feel > Page Layout > Guides > Customize Guide Templates

E.G., https://lemoyne.libapps.com/libguides/lookfeel.php?action=3

This issue is fixed by the accessibility fix described at: https://blog.springshare.com/2019/06/25/june-release/#lg

Cross-reference with: Issue #63