ContextInstitute / bfcom

http://bfn.context.org
GNU General Public License v3.0
4 stars 1 forks source link

Mobile alternative for tooltips #84

Open rgilman opened 5 years ago

rgilman commented 5 years ago

The hover method for tooltips doesn't work on a touch device. I'm wondering what we might do instead.

One option would be to add a '?' icon at the start of the row that was activated by a touch and had a popup panel with help text about all the other icons.

Is there some way (perhaps via JS) that we could only show that '?' icon on touch devices?

Are there other alternatives worth exploring?

iangilman commented 5 years ago

A common way to show things only on mobile would be to use JavaScript to detect touch and then add a class (e.g. is-touch) to the HTML element. Then you can use selectors like .is-touch .help-button to target that scenario.

I'll let you know if I think of an alternative besides a help button. Of course the user can also click on things and see what they do. We should make sure nothing dangerous can happen without warning with that kind of exploration.