Jump to content

Template:Anchor/doc

From Factory Town 2 Wiki

This template can be used to insert an invisible anchor (reference points) into a page that can later be used by internal wiki links.

Usage[edit]

To create a custom anchor, use {{Anchor|Anchor Name}} anywhere in the page.

For example, if you create the anchor {{Anchor|Example Anchor}} in the page [[Example]], you can access it through the internal link [[Example#Example Anchor]].

Remember that you can create a redirect to this template so that you can call it more easily, such as with {{a|Anchor Name}}.

Always substitute inside section headers[edit]

If the target of the anchor is a section, it should always be placed inside the section header before the title, and always substituted. Placing it above, below, or after, or placing it inside the header without substitution causes technical complications and accessibility issues.

Not above the heading[edit]

  • It cannot be viewed or changed by editing the section. This is especially important on the mobile interface, as the button to edit the entire article disappears when scrolling, increasing the reliance on a section editing.
  • If an editor moves the section it relates to by editing the section directly, the anchor link will not be included and will remain in the old position.

Not below the heading[edit]

Editors should not place an anchor underneath a heading, because browsers will hide the section title from view when jumping to the target. This is also inaccessible to users of screen readers.

Not transcluded[edit]

  • The template call will appear in the edit summary each time the section is edited, like this: /* {{Anchor|Transcluded anchor}} Basic format */. In watchlists and history pages, the clickable link to the section will fail to bring the user to the correct section, unless the template call is manually removed before the edit is published.
  • After editors save an edit to a section, they are taken to the top of the page instead of to the section they just edited.

Not after the heading[edit]

Editors should not place a substituted {{subst:Anchor}} after the heading, or even within the heading but after the section title. Users of screen readers rely on anchors to be at the point from which reading should commence; if the anchor is inserted after the section title, the screen reader software will not read out the title and will instead begin with the paragraphs that follow it.

See also[edit]