Should we be using (HTML5) rel attributes within site navigation
Asked Answered
P

2

8

Simply straightforward question, but one for which I cannot find any suggestions.

Supported HTML5 values that are appropriate are:

  • author
  • first
  • last
  • next
  • prev
  • help
  • license (not "licence")

Example

Navigation consisting of index, about, contact & legal

..from the perspective of the index.html page:

  • index.html with rel="first"
  • about.html with rel=author next"
  • contact.html with rel="help"
  • legal.html with rel="license last"

...from the perspective of the contact.html page:

  • index.html with rel="first"
  • about.html with rel=author prev"
  • contact.html with rel="help"
  • legal.html with rel="license next last"

I accept that the use of rel in navigation will achieve very little; but it might help Search Engines in some small way.

I gave the examples both as a demonstration of how this would work in practise and for critique!

Kind Regards, Dale

Edits to examples from comments below

Navigation consisting of index, about, contact & legal

..from the perspective of the index.html page:

  • index.html with no rel
  • about.html with rel=author"
  • contact.html with rel="help"
  • legal.html with rel="license"

...from the perspective of the contact.html page:

  • index.html with no rel
  • about.html with rel=author"
  • contact.html with rel="help"
  • legal.html with rel="license"
Pad answered 22/4, 2012 at 18:1 Comment(0)
E
3

Good Question ! To be honest i'm no expert with the rel attribute (so someone correct me if i'm wrong) but from what i can find Google can verify an identity on a web page via the attribute. Such as

<a rel="me" href="https://plus.google.com/110037486217106671520">Luke Southam</a>

i know this is off the subject of site navigation but it shows Google is reading and indexing the attribute within the <a></a> tag. As for using it within site navigation, if it (possibly) helps Google (or other search engines) to index your website better I say go for it.

Egor answered 22/4, 2012 at 18:53 Comment(6)
Yeah, I am familiar with the article relating to Google promoting (some say unfairly) pages tagged with rel="me". It would therefore seem a logical course of action. But is my 'rel' markup semantically correct in the examples?Pad
like i said before To be honest i'm no expert with the rel attribute . But after reading some documentation on it , help, author, and licence seems correct but i do not understand what the first, prev, next and last areEgor
ok after reading this on pagination with relnext and relprev. It may work but in terms of it used in navigation i don't see the point. a website can be viewed in any order (except from ordered articles) and in my view using next, prev etc for navigation would be pointless. just stick with help, author and licence.Egor
Thanks for finding that resource. I agree with your thoughts as to not using 'first'/'last'/'next'/'prev' as it's giving order in which the website should be viewed. This would be irritating if some function is introduced to allow mouse/keyboard action to change to next/prev page. So, user gets fwded to next page when wanting to fwd to next image.Pad
Just made a correction for the spelling of "license". I'm British and I was using the English spelling of "licence" which is invalid.Pad
I think the point of next/prev etc is for mobile and software like screen readers, to make navigation easier on views that are paged.Gallimaufry
O
1

Yes, you may use rel for links in the navigation. Because …

… you may use rel for every link.

With an appropriate link type, that is. You may only use a specific set of defined and registered rel values in HTML5.


first & last, next & prev

first and last are no longer defined in the HTML5 spec. In the Microformats wiki page existing rel values they are listed as synonyms for begin and end, which are defined as:

identifies the author-defined start[/end] of a sequence of documents of which the current document is a node.

So they are not suitable for a typical website navigation. Use them when linked documents should be read in a specific order.

next and prev are defined in the HTML5 spec as:

[…] indicates that the document is part of a sequence […]

Same argument as above for first/last: only use it if there is a specific order (which is not the case for a navigation consisting of "About", "Contact", "Legal", …). Most prominent use would be for pagination.

author

The author link type

indicates that the referenced document provides further information about the author of the nearest article element ancestor of the element defining the hyperlink, if there is one, or of the page as a whole, otherwise.

You just have to make sure that your navigation (resp. this author link) is not a child of an article element (which would be very uncommon for a site navigation).

help

The help link type is defined as:

For a and area elements, the help keyword indicates that the referenced document provides further help information for the parent of the element defining the hyperlink, and its children.

So this doesn’t seem to be appropriate (even if the Contact page would provide "further help information", because it would be technically the help for the navigation itself (→ the parent element of the link), not for the whole page (which is only the case if used in a link element in the head, or if the help link is a direct child of the body.)

license

The license link type

[…] indicates that the referenced document provides the copyright license terms under which the main content of the current document is provided.

Seems to be appropriate (if your Legal page contains those terms).

Oaken answered 24/11, 2013 at 18:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.