This is a fantastic module as is, and the only thing that would make it perfect for my needs would be to add options for title and alt text. Title would make the PNG button's function explicitly clear to regular users, which is best practice IMO, and the Alt would do the same thing for the visually impaired.

CommentFileSizeAuthor
#4 hover_text.patch3.34 KBastonvictor

Comments

nattyweb’s picture

I agree - it would be a great enhancement to an excellent module!

acke’s picture

The image is a background image so it's not possible with alt text. But a title text could be added to the div. It's probably even better to change the background image to a regular image to meet the WCAG guidelines.

swarad07’s picture

Version: 7.x-1.4 » 8.x-1.x-dev
Assigned: Unassigned » swarad07
astonvictor’s picture

StatusFileSize
new3.34 KB

Hi there.
Try this patch. Added new config field for hover text.

chris matthews’s picture

patch in #4 works good for me, but leaving the status as is in case someone else would like to review & test.

astonvictor’s picture

Status: Active » Needs review
swarad07’s picture

Assigned: swarad07 » Unassigned
acke’s picture

Status: Needs review » Closed (won't fix)

The div is changed to a button so I don't think it's possible to have a title now.
https://www.drupal.org/project/back_to_top/issues/3077497

I close this, but please open if you find a better approach.