Document Relationship

Anonymous's picture

I propose to increase the accessibility (as well as SEO) of the sites using Drupal by supporting the HTML link Element which defines the document relationship. As this element is placed within the HTML head, it isn't directly seen by the user, however the browsers as well as assistive technologies may use this information in order to provide better navigation e.g. by offering a dedicated navigation bar.

Most current browsers support this element.

  • Internet Explorer 8: Plugin Navigation Bar
  • Mozilla Firefox 7: Plugin Link Widgets
  • Konqueror 4.6.5: Plugin "Document Relations" (Package "konq-plugins")
  • Opera 11: Native support
  • Lynx 2.8.8: Native support

You're pleased to complete this list.

On the other side, the Drupal support is very poor. Currently (besides of node module generation link types "canonical" and "shortlink") only the book module generates link types "prev", "next" as well as "up".

The question is, which link types are meaningful in which context and which modules should generate them under which circumstances.


More details please

mgifford's picture

Hey tomuch,

Thanks for the info. Looks like it could be a good add-on module, but not sure it's going to get into core unless it gets broader support within the W3C. I'm interested though in more information about this and how it would improve usability & accessibility.

I'd suggest starting up a sandbox to post some of your ideas & get folks thinking about them in terms of how they use & implement sites. Also, lists of sites which are currently using this element.

We're talking about using this in the heading, right? -

A very valuable element

hughbris's picture

I've always been a big fan of this under-appreciated element.

It has broad support from the W3C by virtue of being part of the standard: don't know when it first appeared, but HTML4.01 is old enough.

As far as SEO goes, ahem, well, let's just say it improves semantic interpretation and that's a Good Thing, always.

With limited time, here's how I've used it in the past to improve accessibility and discoverability:

  • You can link to the same resource in different languages. Both search engines and browsers can use this to match it with your environment (browser/desktop) preferences: <link title="The manual in Arabic" type="text/html" rel="alternate" charset="ISO-8859-6" hreflang="ar" href="arabic.html" /> [adapted from W3C's example]. I think there are language switcher add-ons for Firefox that make use of this in the same way the stylesheet switcher does.
  • I've used it to link to alternate formats of the same resource: a feed of a blog (this is was widely supported in browsers until recently it seems), a PDF version, an HTML5 version maybe. This allows search engines to know that these are the same thing (so only index them once), and to display them in a cluster as options. Apart from feed icons, I don't know of any direct browser support for this.
  • I've used the Previous,Next,Top etc relationships in, for example, instruction manuals, just like the Book module does, as you say. Support is almost non-existent outside of plug-ins, but the Firefox toolbar-like plug-ins show its potential. Search engines can and should use it to cluster results in the same series or set. When you have the ability to customise your search engine's indexing, many of them can support it. Any improvement in search indexing intelligence is a win for usability.

The alternative is lots of links with flag icons, "Printable version", "RSS Feed" and Previous/Next/Top etc cluttering up the rendered page and search engine indexes and tab sequences for that matter. If browsers supported these link types better, such non-content page text wouldn't need to exist. I used to run Opera Mini on a pretty small phone screen. It supported many of these links in its menu and it was invaluable in that awkward environment.

The Canonical and Shortlink relationships are just Google doing nothing to discourage bad URL management habits, IMO. I don't have to like every relationship. It's just a shame these ones happen to get widespread support. :)


mgifford's picture

Thanks @hughbris

  • On the i18n elements, this seems like a natural extension for Drupal. Might not get into D7, but it's definitely worth bringing it up here

  • Do the bot's use the link element? Will it improve SEO? It's worth posting to this module -

  • Interesting to think of using it to convey relationships in the book module. There's good reason to add an issue to core looking at that.

  • Could potentially add something like this to Views.

  • Nice to hear that it is proving useful for the mobile space too. Here again, there's a community who might be interested.


Group events

Add to calendar

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week