Now that the web standards ‘battle’ is being won, and web developers are taking more care with their markup, a regular question is “should I use the address tag?“. This questions comes in various guises, but the fundamental problem is that the
address element doesn’t have the meaning that people assume it does.
On Webaim, the questions was is it good for accessibility. Having discussed this on Evolt before (and been slightly wrong, so read up on it), I jumped in:
Is the address tag good for accessibility?
I would say it’s fairly ambivalent at the moment with regards to accessibility. Not harmful, but not useful either.
With regards to ‘should I use it?’, I would split this into three questions:
- Is there anything useful about address tags for accessibility in the
- Do any current user agents do anything special with it? (Not that I
- Is there any likely future use? (Unlikely.)
For questions one and two: It is a tag with a confusing past, which has lead to it being used in different ways, and User-Agents not making any use of it.
The address tag would seem appropriate for the type of uses that Microformats are for, such as being able to copy contact information from a web page straight into your addressbook.
The reason I don’t think it is likely to be much use in future is that:
- Microformats don’t use
addressfor marking up addresses.
- HTML 5 doesn’t specify it as general contact information markup.
- Neither does XHTML 2.
HTML 4.01, HTML 5 & XHTML 2 define it as contact information for the document or section of a document.
Since that isn’t the use that most people consider it for (marking up general contact information), it is unlikely to be utilised by User Agents for contact information. The address element is likely to be trapped in a spiral of non-use.
Personally, I’d go with microformats.
The question about
address is literally an FAQ, and it will keep recurring if things don’t change. Even a simplebits quiz didn’t really resolve it. From what the Webaim poster said, it is already being mis-used (at least in terms of the current spec):
A (CMS) page that I recently inherited is mostly italics because it is a contact page and the author used address tags not just for the address itself but also for names, e-mails, phone numbers and fax numbers (presumably on the grounds that they are all addresses in a contact context).
Unfortunately not that many people are going to ask, they will just use it on the assumption that it is for any contact information.
I don’t think it would be realistic to suggest changing the meaning of
address now, but is there something else people could be referred to in future?
I haven’t found a better element in HTML 5 or XHTML 2 for the purpose that authors are using at the moment, currently they specify for contact information for the document, not the organisation.
Therefore I can only see two options:
- Tell people that
addressis only for contact information for the document, and the best you can do for general contact information is mark them up with hcard.
- Add a new element, something more generic for contact information. Perhaps a block level
The first is annoying, the second unlikely. Still, might be worth asking about regarding the future of HTML.