question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS - telephone numbers have the default link colour

See original GitHub issue

On iOS telephone numbers are detected and formatted into a link automatically, because this link does not have a govuk-link class it is not styled correctly.

In our service we use a bit of custom CSS to fix the issue (below), maybe this should be added to the govuk-frontend

a[href^="tel"] {
  @extend %govuk-link;
}

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
malcolmhirecommented, Sep 20, 2019

As a note, probably against user needs so I think we would not do it, but you can disabled this with a meta tag:

<meta name="format-detection" content="telephone=no">

Accordion to this, at least in emails, when Apple injects these links there’s additional attributes on it:

https://litmus.com/blog/update-banning-blue-links-on-ios-devices

Which may mean we could do a safer selector like

a[x-apple-data-detectors][href^="tel:"] {

I’ve just tested that and it doesn’t work, guessing it only adds x-apple-data-detectors in Apple Mail. In Safari the anchor tag looks like this: <a href="tel:00000 000 000">00000 000 000</a>

0reactions
NickColleycommented, Oct 25, 2019

In terms of where this feature would go, we already have a concept of global styles that we recommend mainly for prototyping.

This is technically a global style but would be used when global styles are turned off, so perhaps alongside links? Hmmm, It’s risky to add global styles…

Read more comments on GitHub >

github_iconTop Results From Across the Web

html - How do I remove the blue styling of telephone numbers ...
Target links with href values starting with tel by using this css attribute selector: ... This will help you to override phone number...
Read more >
4 ways to fix iPhone numbers converted into blue ... - Medium
Default, Safari on iOS is auto-formatting a phone number to convert into a link because a user can simply tap on the link...
Read more >
How To Ban Blue Links on iOS Devices In Email - Litmus
Learn coding techniques that will ban blue links on iOS devices in email.
Read more >
4 ways to fix iPhone numbers converted into blue ... - Liramail
Default, Safari on iOS is auto-formatting a phone number to convert into a link because a user can simply tap on the link...
Read more >
Link to a webpage, email, phone number, or page in Pages on ...
In Pages on iPhone, link to websites, email addresses, phone numbers, and other pages in the document. Turn automatic link formatting off or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found