WCAG 2.0 guidelines mailto link text - anchor

I'm trying to find guidance from WCAG guidelines about link text in an anchor with a mailto:email address. Can the link-text be the persons name or is it advisable to have the link-text be the email address?
John Doe
versus
johndoe#emailaddress.com

Both are correct, depending on the context.
The Link Purpose (Link Only) guideline states that :
A mechanism is available to allow the purpose of each link to be identified from link text alone, except where the purpose of the link would be ambiguous to users in general. (Level AAA)
So when using a mailto: URI scheme, you should indicate the purpose of the action within the link. The purpose should be something like "Write an e-mail to John Doe", but you should not forget that the e-mail address itself might be important content which you want to give to your visitors for later use.
For instance, the following links are both correct according to the WCAG.
If you want to insist more on the action than the e-mail address:
Send feedback to our company
or if you just want to give your e-mail address to your visitors:
Contact me: John Doe, 10 downing street, London,
E-mail: johndoe#example.com

Related

Is there a web-standards method of suppressing mailto: linkification?

When Gmail opens a message containing a bare email address that does not have mailto: link, it "helpfully" turns it into a mailto: link, there is unwanted change of the text styling too.
Is there a web standards tag that authors (such as email newsletter operators) can use to suppress linkification? On Googling, I see some mention of this idea, <nolink></nolink> and <span class="nolink"></span>. But I could not find any authoritative page saying that this is what I should use.
There are solutions like:
My my mail is <a>myname#example.com</a>
Or
My my mail is myname<span>#</span>example<span>.</span>com
But both are tricks, no standards.

how to change a link on different countries on rails

Is it possible to change the address of a link on different countries?
I am creating a website for a non-profit, and the donations are made through another website(classy).
I have two pages in Classy, one for United States, and one for Canada and the user needs to choose one link to click.
I would like to make the link change automatically if the user is either in US or Canada. Is it possible?
When can I find more information about it?
You should use some functionality which is able to recognize country from IP address, for example geoip gem and then make condition which link should be displayed

Detect where website is opened from

Sorry, this may come across as a bit vague but how would go about and displaying a different logo of an organisation based on where the site is opened from. For example, the organisation would want their official South African logo to be displayed when the site is opened in South Africa, and another official logo when it is opened in Kenya or Ghana for example.
Would the site simply have to be hosted in more than one server...can't think of any other possible way?
To find country first you find Ipaddress
string Ipaddress= HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
Using Ip address you can find location as follows
using (var wc = new WebClient())
{
string output = wc.DownloadString(String.Format("http://api.hostip.info/?ip={0}&position=true", ipaddress));
}
Output is in XML format and it will contain a countryName tag
I would have this as a comment .Since, I don't have enough reputations, I am posting as an answer.
This link would be useful to detect the country and change the logo based on the country in your logic.
Detect/estimate country of a http-request in ASP.NET
Adding the contents of the link, since the link may expire.
You can use one of available web services to match an incoming request to a country.
Otherwise you may decide to grab the MaxMind database file (GeoLite Country), read from this file in your application and perform a match. Thus you will be independent from a third-party service, only pulling regularly updates for the database file.
Also check out similar questions:
Geolocation web service recommendations
Know a good IP address Geolocation Service?
In a very short, in market so many vendors are there, who are tracking geolocation, One of them is google API.
https://www.googleapis.com/geolocation/v1/geolocate?key=YOUR_API_KEY
You can generate your own API_KEY.
Hope this post will helps you. :)

ABNewPersonViewController | address field input

I am looking for a UIControl just like ABNewPersonViewController's address field input. I am building an app that will ask user for its mailing address. Mailing addresses have different components around the globe e.g. a US address will have a state and a zip code in it, whereas a PK address will contain province and postal code in it.
apple's ABNewPersonViewController changes its address field inputs according to the country selected. I am looking to integrate this functionality in my app. I have already tried looking for ABNewPersonViewController's customization but it is not customizable. Any help would be really appreciated.
Have you looked at Apple's internationalization guide? https://developer.apple.com/library/ios/documentation/MacOSX/Conceptual/BPInternational/Introduction/Introduction.html
This guide should cover what you need. App localization is well worth the effort.
Addresses can also be detected using NSDataDetecor (https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSDataDetector_Class/index.html#//apple_ref/doc/uid/TP40009936) if you need the flexibility you can use this class to check if a string is an address.

Using Gmail message source, generate direct link

So using the gmail message source is it possible to generate, a link to the message/thread in GMail's own interface?
on http://productforums.google.com/forum/#!topic/gmail/goChl1gG0NQ they use the following
https://mail.google.com/mail/#all/<HexEncodeMessageID>
Is this related to the Message=ID header found in the mail's source?
Message-ID: <SomeID#SomeID.mail>
The discussion Find Gmail url-IDs via IMAP seems to only give IMAP based solutions.
Update
This bookmarklet no longer works. See Benjamin Ziepert's update.
Original Answer
I decided to make a bookmarklet to help automate this.
javascript:window.location="https://gmail.com/#search/rfc822msgid:"+encodeURIComponent(window.document.body.innerHTML.match(/Message-ID: <(.*)>/i)[1])+"/"+encodeURIComponent(window.location.search.toString().slice(1).split('&').filter(function(x){return x.slice(0,3) == "th="})[0].slice(3));
Save this link on your bookmarks bar.
To get a direct link to a message, choose "Show original" on the dropdown for that message, and then click the bookmarklet on the new page that opens.
If anyone has suggestions for a clean way to do this without having to click show original, I'm all ears.
The "HexEncodeMessageID" that you refer to (and that occurs in links such as https://mail.google.com/mail/#inbox/14197d2548c9da1a) is unfortunately different from the RFC822 message ID (which occurs in the source of the email).
I do not know of any way to get a direct link to an email using the RFC822 message ID, but it is possible to search for a particular RFC822 message ID in Gmail (see GMail doc):
in:anywhere rfc822msgid:SomeID#SomeID.mail
You can turn this into a link:
https://mail.google.com/mail/#search/in%3Aanywhere+rfc822msgid%3ASomeID#SomeID.mail
(Don't forget that the message id should be URL-encoded. You can also just type the search in your GMail and copy the resulting URL afterwards.)
The problem with this link is that it does not send you to the mail directly, but to a search result page with a single hit. But this might be good enough for some applications.
The advantage is: The RFC822 is the same in your account and in the account of the sender. So if you want to refer to a given email in an email/chat, you can provide this search link (assuming the recipient also uses GMail). With the "HexEncodeMessageID" this would not work, because it is different in every account (according to my own experiments).
One last thing: the link only works when you are already logged in.
Here's an updated bookmarklet over what Benjamin Ziepert suggested. Basically with removed /u/0 part to make it a little more account-independent.
javascript:window.open("https://mail.google.com/mail/#search/rfc822msgid%3A" + encodeURIComponent(document.getElementsByClassName('message_id')[0].innerHTML.slice(4, -4)), "_self");
Usage: Save this link on your bookmarks bar. To get a direct link to a message, choose "Show original" on the dropdown for that message, and then click the bookmarklet on the new page that opens.

Resources