rel-up: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(→‎Use cases: added specific examples of browsers/extensions which improve navigation with rel=up)
(→‎Use cases: gave an example how assistive technology could use rel=up (don’t know whether this is done in any software today) and how a "polyfill" could work)
Line 32: Line 32:
This explicit knowledge can improve navigation for users of navigation bars, either browser extension or built-in. Multiple such bars exist and existed in the past. In 2018, at least the SeaMonkey, iCab and Lynx browsers support ''rel=up'' natively. Opera did in the past. Add-ons for previous Firefox versions which used ''rel=up'' included Link Widgets by cdn and Stephen Clavering, Site navigation bar by Klaus Bolwin, cmSiteNavigation Toolbar by Christoph A. Mueller. A LinkBar Add-on for Internet Explorer was available. See <nowiki>http://matthias.gutfeldt.ch/translation/LINK/addendum.html</nowiki> for exotic/historical examples.
This explicit knowledge can improve navigation for users of navigation bars, either browser extension or built-in. Multiple such bars exist and existed in the past. In 2018, at least the SeaMonkey, iCab and Lynx browsers support ''rel=up'' natively. Opera did in the past. Add-ons for previous Firefox versions which used ''rel=up'' included Link Widgets by cdn and Stephen Clavering, Site navigation bar by Klaus Bolwin, cmSiteNavigation Toolbar by Christoph A. Mueller. A LinkBar Add-on for Internet Explorer was available. See <nowiki>http://matthias.gutfeldt.ch/translation/LINK/addendum.html</nowiki> for exotic/historical examples.


Assistive technology (does any today?) could communicate (what should it say?) better what a link such as the following means:
Assistive technology (does any today?) could communicate better what a link such as the following means, for example by reading "link to ''parent page'', arrow up" instead of just "link, arrow up":


<source lang=html4strict><a rel='up' href='..'>↑</a></source>
<source lang=html4strict><a rel='up' href='..'>↑</a></source>
In the absence of native support for ''rel=up'' and similar link relations (''next'', ''prev'', …) in assistive technology it’s possible to translate the ''rel'' values to a textual description with the ''aria-label'' attribute automatically using a script.


Hierarchical information allows for better sitemaps to be generated automatically by web spiders.
Hierarchical information allows for better sitemaps to be generated automatically by web spiders.

Revision as of 13:41, 23 June 2018

This article is a stub. You can help the microformats.org wiki by expanding it.

Description

Refers to a parent document in a hierarchy of documents.

Example

A page (https://prlbr.de/galerie/14/am-pranger/) in a photo gallery showcases a photo. The page defines multiple link relations which refer to the

  • next page which contains the next photo from the gallery
  • previous page from the gallery
  • parent page using up, which shows previews of many photos as thumbnails including the current one and includes links to their corresponding pages.
<link rel='next' href='/galerie/14/mustergatte/'>
<link rel='prev' href='/galerie/14/linie-1/'>
<link rel='up' href='/galerie/seite-6'>

next and prev relate to documents on the same hierarchy level while up moves one level up.

Use cases

Authors can make a hierarchical relationship discoverable, for example between

  • a single photo page and a gallery overview page
  • a forum thread and a forum
  • the archive page for a single month in a blog and the archive page for the whole year
  • in software documentation a page about a class and its parent class

This explicit knowledge can improve navigation for users of navigation bars, either browser extension or built-in. Multiple such bars exist and existed in the past. In 2018, at least the SeaMonkey, iCab and Lynx browsers support rel=up natively. Opera did in the past. Add-ons for previous Firefox versions which used rel=up included Link Widgets by cdn and Stephen Clavering, Site navigation bar by Klaus Bolwin, cmSiteNavigation Toolbar by Christoph A. Mueller. A LinkBar Add-on for Internet Explorer was available. See http://matthias.gutfeldt.ch/translation/LINK/addendum.html for exotic/historical examples.

Assistive technology (does any today?) could communicate better what a link such as the following means, for example by reading "link to parent page, arrow up" instead of just "link, arrow up":

<a rel='up' href='..'></a>

In the absence of native support for rel=up and similar link relations (next, prev, …) in assistive technology it’s possible to translate the rel values to a textual description with the aria-label attribute automatically using a script.

Hierarchical information allows for better sitemaps to be generated automatically by web spiders.

  • Web spiders tend to prefer an explicit sitemap for that use-case. Tantek 22:18, 20 June 2018 (UTC)

Standards

The link relation up is recognized in standards:

  • IANA link relations registry (https://www.iana.org/assignments/link-relations/link-relations.xhtml)
  • XHTML vocabulary (https://www.w3.org/1999/xhtml/vocab#up)
    • and hence XHTML+RDFa Initial Context (https://www.w3.org/2011/rdfa-context/xhtml-rdfa-1.1)
  • This is good reason to reserve the rel value of "up", but insufficient to make it a standard, since those registries do not require use-cases or implementation, both of which are essential to having a useful standard. - Tantek 22:18, 20 June 2018 (UTC)

History

Historically up has also been in HTML3 (https://www.w3.org/MarkUp/html3/dochead.html), but could not be found in later editions of HTML, until its use in practice was recognized during the development of HTML5 (https://blog.whatwg.org/the-road-to-html-5-link-relations#rel-first) and hence found its way into HTML5 Working Drafts (https://www.w3.org/TR/2011/WD-html5-20110113/links.html#link-type-up). Then the link relation up was dropped from HTML5 without prejudice (https://lists.w3.org/Archives/Public/public-html/2011Feb/att-0481/issue-118-decision.html) for adding it to other future link relation registries – e.g. this this microformats WIKI – and recognizing that it is a defined standard anyway due to the IANA registry:

Finally, it was noted that the link relations being dropped are already defined in the IANA registry and could be defined in future registries;

An argument against that decision was that dropping up from the HTML standard would cause content to show up as invalid in validators and would stop people from using it, which was apparently not the intention when dropping it from the HTML core standard. The counter argument was:

Since validators do not implement relation checking at all yet and are waiting on a registry solution before doing so, this was also a weak objection.

However, once a registry solution was found – i.e. currently this this microformats WIKI – the new registry failed to add the link relation up as valid value and validators started to report it as an error. Unfortunately, this caused multiple software projects to remove rel=up from software such as content management systems (https://github.com/webdevops/TYPO3-metaseo/commit/71f2e1b492dfa6304024594a0c7c3b5bd6bea3e4), documentation tools (https://github.com/sphinx-doc/sphinx/commit/d43259f5f748cd00eba168b54b7b798d3f257911) and bulletin boards (https://www.phpbb.com/community/viewtopic.php?f=74&t=2170174).

Implementations

See Also