Archived topic
GB Back to Top Accessibility
3 replies · Started by Pat on August 6, 2016
Hi Tom,
I am pretty new to GeneratePress but I'm seriously impressed and loving it! I'm currently using GP with GP Premium to build a site that needs to pass WCAG 2.0 Accessibility testing. I'm using the Back to Top feature, but it fails Accessibility testing. I WAS able to tweak it using a custom function you provided here:
https://generatepress.com/forums/topic/modifying-scroll-back-to-top-button/
I simply modified the function to remove the image link and reverted back to using FontAwesome, and added this before the closing </a> tag:
<span class="screen-reader-text">Back To Top</span>
...and use the stylesheet to make the text available only to screen readers / assistive devices.
Because this is such a simple accessibility fix, I'm thinking it may be worthwhile considering adding this to the 'back to top' function in GP.
Cheers,
PK
Thank you! I really appreciate that :)
I've made this happen in the next version - you can grab it here: https://github.com/tomusborne/GeneratePress
Wow! That is awesome! Thanks so much.
Cheers,
PK
Thanks for the contribution! :)