Depricate the address element?

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:

  1. Is there anything useful about address tags for accessibility in the
    specs? (No.)
  2. Do any current user agents do anything special with it? (Not that I
    know of.)
  3. 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:

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.

What next?

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 address is 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 contact element?

The first is annoying, the second unlikely. Still, might be worth asking about regarding the future of HTML.

Technorati Tags:

7 contributions to “Depricate the address element?

  1. The choice ist not hCard or address. The html elements (or tags) are bejond the scope of microformats. And hCard goes very well with address. Marking up an address container with class=”vcard” and putting general (or not so general) contact information into this container is an optimal way to include this contact information in a web page.

    Additionally it is possible to further refine the role of the contact information container, independent of if this container is an adderess container or a div or whatever. Setting the class to vcard specifies this container to not only contain general contact information, but special contact information formatted according to the hCard specification. And f.ex. with Dublin Core it would be possible to further specify the role of that contact information (DC.creator, DC.contributor, DC.publisher) (see also:
    The suggestion to eliminate the address tag is no good idea. Just because it is rarely used does not imply that it is useless. It offers an option, which should be kept.

  2. Your right that address and hcard are not mutually exclusive. However, my point is that if you use address for contact information other than that of the document author, you are wrong (according to current and proposed specs).

    I believe that it why Microformats don’t use it, because that would be misleading. (I’m fairly sure that is Tantec’s opinion.)

    Therefore any functionality that user-agents implemented to take advantage of the element would conflict with it’s current use.

    Oh, and by deprecate, I didn’t mean eliminate, just not recommend for general usage any more.

  3. Are you sure that address is only specified for contact information for the pages author? Not for a pages contributor, publisher ore anything else related to that page? Only the author?

  4. Which bit was that from? The part I would refer to is the HTML spec:

    The ADDRESS element may be used by authors to supply contact information for a document or a major part of a document such as a form.

    HTML 5 is very similar (as you would expect from being backwards compatible), and makes it more explicit:

    The address element represents a paragraph of contact information for the section it applies to
    [snipped example]
    The address element must not be used to represent arbitrary addresses (e.g. postal addresses), unless those addresses are contact information for the section.

    XHTML 2 replicates the HTML 4.01 wording.

    It is also the number 1 FAQ on hCards, which concludes:

    In short, DO NOT use address to markup addresses in general. Only use it to markup the contact information for the page (or major part thereof), and when doing so, use it to markup the entire contact information (via address class=”vcard”), not just the address of the contact.

    I agree that it wasn’t very specific in the HTML spec, but the meaning that people writing specs have given it since is quite clear.

    That is quite a good indicator of what would be implemented (or not) in browsers & user-agents.

    I’m just saying that there is a divide between what web developers think it is for, and what the spec & browser people think it’s for.

  5. My position is to loosen it’s meaning for HTML5. The meanings of other elements are being adjusted to better reflect common usage, and using <address> for marking up any sort of contact information would be more useful in practise. Since UAs don’t do anything special with it yet, maybe that would find some traction and the change would be made.

    Address wasn’t one of the top class values so it’s difficult to find figures for what people are currently using for contact information.

    However, just about every website I visit has a contact page with details that are relevant beyond that section of that page. The only time I see <address> being used as specified in HTML4 is on W3C pages and Apache documentation…which is hardly common.

    Since making the semantics less restrictive would still keep it compatible with existing UAs, I think that’s a feasible option.

Comments are closed.