Page MenuHomePhabricator

Investigation: Possibilities to describe a "note" not as a "reference"
Open, LowPublic

Description

<ref> tags are not only used for footnotes that are literally "references", but for other notes as well. Some find the headline "Reference" confusing then.

Reported here:

Example articles:

Analysis:

Possible ways forward:

  • The extension is able to detect a few special reference types, namely "book", "journal", "news", and "web", along with the generic one. We could add a "note" type for the community to use. Note this currently only works when the wikitext looks like <ref><cite class="book">…</cite></ref>. It's possible to change both examples above to match this requirement, but this is up to the community.
  • Ask the communities to change the relevant templates accordingly. Example: <ref><cite class="web">…</cite></ref>
  • Check if it makes sense to implement auto-detection for some of the most frequently used note templates, if possible. E.g. detect that id="noteTag-… when it's used on more than one wiki?

Event Timeline

Briefly discussed during today's daily: It might be possible to somehow add a type to the <references /> tag to change the heading of all references in a group to "Note". Currently the only possibility to do something like this is <div class="notes"><references /></div>. It's technically not very difficult to teach the individual popups to look for this class name. Another possibility is to reserve group names for this purpose (e.g. group="notes")[1] or add support for class="…" or something similar directly to the <references /> tag. The biggest issue is to come up with a specification:

  • It should be easy to do and to understand in the wikitext.
  • Ideally not only English but localizable (however, the current types aren't localizable either).
  • It should be unlikely a user accidentally triggers this. Note that <references /> tags are very often wrapped in <div> for various reasons. We should pick a class name that is not already used for other purposes.

[1] Note there are already pre-defined group names like group="upper-roman". It would be impossible to use that together with "notes", which is probably not a good idea.

The extension is able to detect a few special reference types […] We could add a "note" type for the community to use.

We did this via T274343.

We could do more, e.g. adding an attribute <references group="…" default-type="notes" /> that displays all generic references in this group as a "note" instead (unless an individual reference does have a special type). Another option is to detect certain <div> wrappers (e.g. the <div id="references-NoteFoot"> or <div class="notes"> mentioned above).

Leaving this open for now.

Would note this on the open task instead of the closed one: <cite> HTML tag is used to describe ‘the title of the cited work’, not any citation, so asking for <cite class="note"> is asking for incorrect HTML syntax since notes are usually just comments on something. Maybe this can be salvaged though by also allowing to match any <span class="mw-cite-note">, for example.