Applying <a href="tel:."> only when device supports it
csdude55
11:06 pm on Jan 5, 2024 (gmt 0)
Any suggestions on a way to make a telephone number clickable IF the user's device can make calls?
Meaning, I'd like to show it on mobile devices, of course, but not necessarily desktops unless they have a way of making the call.
tangor
8:06 am on Jan 8, 2024 (gmt 0)
Not sure I'd personally make this available without user permission. Some folks might not agree such ease of dialing. Then again, IIRC you've got a classified site and obviously contact info is included for each entry for the process to work.
To me "click and call" is taking it a step too far. This is too prone to introduce errors and can have accidental consequences!
csdude55
2:46 pm on Jan 8, 2024 (gmt 0)
I have mixed emotions on it, too. But I'm making the site more mobile friendly, and I recognize that SOME features on the site would be better if the user could click to call instead of copy-and-pasting. Or worse, not know how to do that so they have to go back and forth between their browser and phone :-O
I've had to accept that fact that a lot of my users are EXTREMELY computer illiterate, so I'm trying to make it as dummy-proof as possible. And I can just imagine 1,000 people on their computers clicking on the link to call, and not understanding why their landline isn't ringing! LOL