subscribe

<input type="email"> and Firefox Contacts Add-on

Mozilla Labs

Yesterday Mozilla Labs published the Contacts add-on, which I think is pretty neat. The add-on integrates your existing (Twitter, Gmail and AddressBook.app) contacts into your browser. It's pre-alpha stability, but it seems to work for me.

After installing it, it allows you to use contacts in two new ways:

  1. Any <input type="email" /> field will now auto-complete with the contacts in your list.
  2. A javascript api is added, allowing you (the developer) to pull in contacts from the user. The api is in the W3C standards track.

I love seeing these types of bite-size non-obtrusive features getting implemented in the browser.

The <input type="email" /> form element is specified in the HTML5 specification, but it mostly discusses validation & sanitation. It has been supported by Opera for a while, and Safari now does too. Any old browser will also gladly accept type="email", because the behaviour for unknown types has always been to revert to type="text".

So the next time you're asking your users for an email address, consider using type="email", which automatically makes you future compatible when all the browsers get around implementing it.

Web mentions

Comments

  • siep

    siep

    I'm a big fan of these html-5 input types, as they (may) also modify your mobile keyboard. For example when I focus on an input type="url" there's a ".com" button on my on-screen keyboard. input type="email" renders an "@"' button. Those are small but neat additions and hugely improve ease of use.

    I also love Mozilla labs experiments/products, weave being one of my favorites. When contacts is integrated with weave, I don't think I'd ever need a contacts-app anymore.