rel-up: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(added possible use cases)
(a few parentheticals, standards discussion)
Line 23: Line 23:
== Use cases ==
== Use cases ==


Authors can make a hierarchical relationship machine-readable, for example between
Authors can make a hierarchical relationship discoverable, for example between


* a single photo page and a gallery overview page
* a single photo page and a gallery overview page
Line 30: Line 30:
* in software documentation a page about a class and its parent class
* in software documentation a page about a class and its parent class


This can improve navigation for users of navigation bars, either browser extension or built-in. Multiple such bars exist and existed in the past. Assistive technology could communicate better what a link such as the following means:
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 (specific examples of each?).  
 
Assistive technology (does any today?) could communicate (what should it say?) better what a link such as the following means:


<source lang=html4strict><a rel='up' href='..'>↑</a></source>
<source lang=html4strict><a rel='up' href='..'>↑</a></source>


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.
* Web spiders tend to prefer an explicit [[sitemap]] for that use-case. [[User:Tantek|Tantek]] 22:18, 20 June 2018 (UTC)


== Standards ==
== Standards ==
Line 43: Line 46:
* XHTML vocabulary (<nowiki>https://www.w3.org/1999/xhtml/vocab#up</nowiki>)
* XHTML vocabulary (<nowiki>https://www.w3.org/1999/xhtml/vocab#up</nowiki>)
** and hence XHTML+RDFa Initial Context (<nowiki>https://www.w3.org/2011/rdfa-context/xhtml-rdfa-1.1</nowiki>)
** and hence XHTML+RDFa Initial Context (<nowiki>https://www.w3.org/2011/rdfa-context/xhtml-rdfa-1.1</nowiki>)
<div class="discussion">
* 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. - [[User:Tantek|Tantek]] 22:18, 20 June 2018 (UTC)
</div>


== History ==
== History ==

Revision as of 22:18, 20 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 (specific examples of each?).

Assistive technology (does any today?) could communicate (what should it say?) better what a link such as the following means:

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

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