Jump to content

Template talk:Ref supports2

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Example

[edit]

So, as used at Pituri:

The population of ''Duboisia hopwoodii'' around the Mulligan River used in the production of a much sought after version of pituri is high in nicotine and low in nornicotine.{{Ref supports2|<ref name=French>{{cite journal | last1 = French | first1 = P | last2 = James | first2 = E | last3 = Walsh | first3 = N | year = 2012 | title = Analysis of genetic variation in a disjunct, narcotic producing, population of Duboisia hopwoodii (F. Muell.) F. Muell | url = http://www.rbg.vic.gov.au/documents/Muelleria_30-1_6_French_James_Walsh.pdf | format = PDF | journal = Muelleria | volume = 30 | issue = 1| pages = 65–71 }}</ref>|"The population of ''Duboisia hopwoodii'' around the Mulligan River used in the production of a much sought after version of pituri is high in nicotine and low in nornicotine."}}

This strikes me as useful in terms of verifiability, but the form seems rather painful to see widespread use. Couldn't it rather be restructured? Perhaps something along these lines:

{{Ref supported2 |refname=French |ref={{cite journal | last1 = French | first1 = P | last2 = James | first2 = E | last3 = Walsh | first3 = N | year = 2012 | title = Analysis of genetic variation in a disjunct, narcotic producing, population of Duboisia hopwoodii (F. Muell.) F. Muell | url = http://www.rbg.vic.gov.au/documents/Muelleria_30-1_6_French_James_Walsh.pdf | format = PDF | journal = Muelleria | volume = 30 | issue = 1| pages = 65–71 }} |text=The population of ''Duboisia hopwoodii'' around the Mulligan River used in the production of a much sought after version of pituri is high in nicotine and low in nornicotine. }}

Then subsequent uses of the source could just be: {{Ref supported2 |refname=French | pages = 70 |text=Aboriginal people frequently burnt pituri to promote new growth. }}

Page number presentation could resemble that done using {{rp}}. This would then render as:
The population of Duboisia hopwoodii around the Mulligan River used in the production of a much sought after version of pituri is high in nicotine and low in nornicotine.[1]: 65–71  Aboriginal people frequently burnt pituri to promote new growth.[1]: 70 

  1. ^ a b French, P; James, E; Walsh, N (2012). "Analysis of genetic variation in a disjunct, narcotic producing, population of Duboisia hopwoodii (F. Muell.) F. Muell" (PDF). Muelleria. 30 (1).

Think that might work? LeadSongDog come howl! 18:29, 17 March 2016 (UTC)[reply]

I agree that the current usage is cumbersome and the syntax you have suggested is better. I have implemented something close to what you have suggested in {{Ref supports2/sandbox}}. There are some limitations and changes.
Limitations:
  1. Formatting (e.g. italics and bold) is not possible in a tooltip. Thus, the ''Duboisia hopwoodii'' would be displayed exactly like that, including the ''''.
  2. It is not trivial to pull the page numbers out of the cite template and also use them in the {{Ref supports2}} displayed information. It is potentially possible to do this with LUA, but it would be considerable additional effort for me. But, I've been intending to learn LUA. So, I may take a stab at it. After thinking about it, I feel the way it is now is better due to the more explicit control provided to the editor. If I was an editor I would not like it if this template pulled the pages out of the cite template. This also allows editors to use it with, or without, the page numbers formatted like {{rp}}. In the meantime, this results in no page numbers displayed next to the reference marker unless the |page= or |pages= argument is specified for {{Ref supports2}}. If it is desired for it to be displayed in both the reference text and next to the reference marker, then the argument needs to be in both the cite template and {{Ref supports2}}.
Changes/additions:
  1. I am undecided which is the better parameter name: |name= (matches what is used in <ref name=""/>) or |refname= which is more descriptive. Both parameter names work, but only one should be used at a time.
  2. Up to 9 separate text strings can be specified |text=/|text1= through |text9=.
  3. |pages= and |page= are both available.
  4. Quotes are automatically added to the text segments.
Example:
{{Ref supports2/sandbox |name=French |ref={{cite journal | last1 = French | first1 = P | last2 = James | first2 = E | last3 = Walsh | first3 = N | year = 2012 | title = Analysis of genetic variation in a disjunct, narcotic producing, population of Duboisia hopwoodii (F. Muell.) F. Muell | url = http://www.rbg.vic.gov.au/documents/Muelleria_30-1_6_French_James_Walsh.pdf | format = PDF | journal = Muelleria | volume = 30 | issue = 1 }} |text=The population of Duboisia hopwoodii around the Mulligan River used in the production of a much sought after version of pituri is high in nicotine and low in nornicotine.| pages = 65–71}}
Then subsequent uses of the source are:
{{Ref supports2/sandbox |name=French | page = 70 |text=Aboriginal people frequently burnt pituri to promote new growth. }}
This renders as:
The population of Duboisia hopwoodii around the Mulligan River used in the production of a much sought after version of pituri is high in nicotine and low in nornicotine.{{{1}}}  Aboriginal people frequently burnt pituri to promote new growth.{{{1}}}

References

LeadSongDog, is this close enough to what you desired? Any other suggestions/requests/improvements?
Anthonyhcole: You have indicated (now below) that you are in favor of the updated syntax. I also prefer the updated syntax. If there are no additional suggestions, I will update the live version to the syntax described above, as is used in the sandbox: {{Ref supports2/sandbox}}. I can also help, or do, the updating that will be needed on the non-archive pages which currently use {{Ref supports2}}. Alternately, I can create {{Ref supports4}} which uses this syntax. What would you prefer? — Makyen (talk) 08:58, 18 March 2016 (UTC) and 09:00, 18 March 2016 (UTC)[reply]
I think using refname vice name is probably an improvement. It avoids the possibility of confusion with ref=harv. Of course, should the user insert |ref=harv within the {{cite journal}} parameters, then the refname should be set implicitly, unless an explicit |refname=RefNameValue overrides it. LeadSongDog come howl! 19:50, 18 March 2016 (UTC)[reply]
Sorry for the delay, Makyen and LeadSongDog. I think this is an elegant solution. Could you please make Template:Ref supports2/sandbox Template:Ref supports4?, Makyen, then I'll go round (eventually) and update the few articles using Ref supports2?
I don't know if this interests you but, in case it does, in this discussion it occurred to me that we could use this template in archived versions that have passed peer- or expert-review. Since no one will be editing those versions, it won't matter what the wikitext looks like. So, I'll be doing that for the whole of Parkinson's disease if the current review ever finishes, and this slimmer solution will be a boon there. --Anthonyhcole (talk · contribs · email) 09:40, 28 March 2016 (UTC)[reply]

How adding citations/supported text should work in the editors

[edit]
moved to meta
The following discussion has been closed. Please do not modify it.

Thanks, LeadSongDog. I won't contribute here because looking at code gives me a headache. I'm happy to leave the technical design to WMF. That's what we pay them for. What I'd like us to do is work out a clear vision of how we want this thing to look and work - from the editor's perspective.

My preferred solution is: the editor pastes a doi, url, ISBN, PMID or whatever into a form (via the visual editor), adds page numbers, copy/pastes the article text being supported into the form, and clicks save. That's about as much typing as I think we should be expected to do. What do you think? --Anthonyhcole (talk · contribs · email) 01:35, 18 March 2016 (UTC)[reply]

Not everyone uses the visual editor, some of us prefer the wikitext. Either way, keeping the wikitext as simple as possible pays off. What bothers me about the existing template is too much extraneous detail, too hard to use. The ref tags serve no real purpose, nor the repetition of text. Hence my suggestions above. LeadSongDog come howl! 02:57, 18 March 2016 (UTC)[reply]
Definitely. If the wikicode can be minimised like that, all the better. --Anthonyhcole (talk · contribs · email) 08:11, 18 March 2016 (UTC)[reply]
First, I have split this into a separate topic, as it appears broader than just the specific syntax used for this template. I also wonder if there is a more appropriate place to have these broader discussions (this and the one I added below regarding how the support should be indicated to the reader) than the talk page of a fairly obscure template. We can move it elsewhere, or talk here for a while and then move it elsewhere for broader participation.
We should consider how it is desired to have editors indicate the connections between the reference and supported text.
Visual Editor:
I, also, don't use the visual editor. However, I have ideas about how indicating what text is supported could be input and displayed. Ideally, the user should be able to do something as simple as highlighting some text with the mouse, right-click and select "add supporting reference" (or click a button, or press a hotkey) then add any of the identifiers which Anthonyhcole mentioned into a popup and have everything filled out for them (there really should be a display of the citation which the user should check). Alternately they could right-click on a reference and select "associate supported text", or some such, then highlight text (or highlight, then right click on the reference and select "highlighted text is supported by this reference".
I would also want there to be a warning popup when someone is changing text that is specified as supported to force them to click on something indicating that they have verified that the new text is still supported by the reference. Perhaps, if it is an online reference, it should offer to open a tab with the reference for the user to look at.
wikitext:
The new syntax is better, but still cumbersome. With a version of indicating supported text that includes the use of JavaScript, or changes to the MediaWiki software, it would be possible to have parameters that indicate that the previous X sentences, or paragraphs, are supported by the reference. However, there is a reason to have the text that is supported be explicitly stated (duplicated). That reason is that text often gets changed by editors without checking that the reference supports the change. This can migrate, through years, to the point that what is in a paragraph with a reference has no relationship to what the reference actually says. In my opinion, there should be at least some type of necessary additional step that someone has to take in order to change text that is explicitly supported by a reference in order for the text to still show as supported.
An alternate method of indicating connections is to have the supported text enclosed in a template within the paragraph. This also becomes cumbersome when there are multiple references with overlapping supported text. An example of this method is used for the the third style of indicating supported text that was implemented, as mentioned below in #How, ideally, should the supported text be indicated to readers on Wikipedia pages. (Example page) implemented with {{Supported by ref}} and {{Ref supports3}}
— Makyen (talk) 08:53, 18 March 2016 (UTC)[reply]
Makyen, I like

"Ideally, the user should be able to do something as simple as highlighting some text with the mouse, right-click and select "add supporting reference" (or click a button, or press a hotkey) then add any of the identifiers which Anthonyhcole mentioned into a popup and have everything filled out for them (there really should be a display of the citation which the user should check)."

A lot. --Anthonyhcole (talk · contribs · email) 08:12, 19 March 2016 (UTC)[reply]
I've no objection to moving the discussion, it's just a bit early to figure out where to take it. There have been many such discussions over the years in many places. I'd like to avoid getting caught up in implementation details ahead of getting somewhere with the basic concepts. Perhaps we can start by getting clear terms. It likely is sensible to adopt nomenclature consistent with Wikidata in order to facilitate translation efforts. I'll suggest this terminology:
Discussion:
An statement without citation "may be challenged" by the addition of the {{citation needed}} tag. A statement that seems to be possibly false-valued "may be challenged" by the addition of the {{verification needed}} tag. To verify that a citation is correct, it is only necessary to locate the corresponding bibliographic record in a trusted catalog. Inability to locate such a record should trigger addition of a {{citation error}} instance. To verify that the statement is true, it is necessary for a reviewer to locate and obtain another instance of the reference work, find the relevant part of that work, and compare it to the statement being tested. Having done so, if the citation does not support the statement it should trigger a {{fails verification}} instance. If it does support it, there should someday be a mechanism for the reviewing editor to so indicate against a specific revision of the statement, or equivalently a revision of the encyclopedic article. Occasionally, the difficulty of accessing a copy of the reference work means that it must be left up to a wikignome who cannot understand its meaning, whether for reasons of language, or technical difficulty. Such cases often crop up at wp:RX. These may lead to a substantial section of the work being copied and sent to another editor who can understand it and perform the verification. It is sometimes helpful if these verifiers either quote the relevant bit or store a copy in case further examination is necessary. The scarcer the source the more helpful this approach can be. The verifying editor may use the {{quotation needed}} markup to request this. LeadSongDog come howl! 19:37, 18 March 2016 (UTC)[reply]
I agree with all of that, and agree with Makyen that this conversation deserves preserving on somewhere more broad-stroke than a template discussion page. I've just created http://meta.wikimedia.org/wiki/Talk:Reliability_project . What do you say we move this there? --Anthonyhcole (talk · contribs · email) 08:01, 19 March 2016 (UTC)[reply]

How, ideally, should the supported text be indicated to readers on Wikipedia pages

[edit]

This template was developed as one of three different methods of indicating the supported text which I made for Anthonyhcole:

  1. Highlight supported text on-page upon hover over a reference marker (requires JavaScript and is thus not available without either the user installing the JS, having it as a gadget, or integrated into base Wikipedia functionality) {{Ref supports}} + JavaScript: (Example1), (Example2)
  2. Show a tooltip with the supported text upon hover over the reference marker this template: {{Ref supports2}} (Example)
  3. Highlighting the supported text when you click on an "s" below the reference marker. {{Supported by ref}} and {{Ref supports3}}; (Example)

I don't consider these are the end-all be-all of how the text supported by a reference (or the reference that supports the text) should be indicated on a Wikipedia page. Of the three, I prefer the presentation of #1 where the supported text is highlighted when the cursor is hovering over the reference marker. It would be possible to have the reference marker highlighted when the supported text is hovered over (not sure if I would like it, I would want to try it prior to deciding).

If indicating the page-text supported by a reference, or visa-versa, is generally supported on Wikipedia, then it could be implemented within the MediaWiki software. This would result in widening the field of possible ways to display these connections to the user beyond the 3 examples above.

So the question is: What is the preferred/ideal way to indicate these connections to the user? I'm open to brainstorming for additional possible methods of indicating these connections.— Makyen (talk) 08:51, 18 March 2016 (UTC)[reply]

(Thinking, not ignoring. --Anthonyhcole (talk · contribs · email) 08:03, 19 March 2016 (UTC))[reply]
Like you, I prefer option 1. We need to be aware of the objection User:Iridescent raised in the above-linked conversation, though. [1] Any solution that adds complexity to the edit box will just be flicked aside by editors. If there is a way to add this function to the traditional edit box, without adding a lot of text to the edit box, then those interested will embrace it, and those not, won't care. Something like
  1. highlight the citation (<ref>blah blah</ref>)
  2. click a button on the tool bar above the edit box
  3. highlight the supported text
  4. click a button on the tool bar
  5. save.
Would work - provided the result in the edit box is just the addition of four or six characters. The little I know about MediaWiki tells me that's not possible, though. But then, I know nothing really about coding.
If that kind of solution is out of reach, this will have to wait until most editors are using the visual editor, so won't be affected by lots of extra code in the edit box. I think. --Anthonyhcole (talk · contribs · email) 10:08, 28 March 2016 (UTC)[reply]

Template code rewrite for accessibility and semantics

[edit]

Hey Makyen, I just discovered this template and will probably be using it in the future (it is very useful, so much so that I wish it was integrated into MediaWiki's code), but I noticed that the current template code uses {{abbr}} to provide its tooltip. As is noted in Template:Abbr/doc § Accessibility and HTML validity concerns, using {{abbr}} and <abbr> for non-abbreviation purposes has accessibility and semantics concerns. Would you be willing to rewrite the template to avoid this? Perhaps something like {{rp}}'s current implementation for its |quote= parameter?

I would attempt to do so myself (or ask someone more competent in template editing and HTML than I am to do so), but since you developed this template, I might as well ask you first. Thanks for your time and consideration. —Nøkkenbuer (talkcontribs) 23:39, 11 July 2018 (UTC)[reply]

Nøkkenbuer, At the time that I made this template, I chose {{abbr}} because what I'd read about accessibility indicated that screenreaders, in general, supported tooltips produced by <abbr> elements significantly better than those produced using any other method (e.g. a title attribute in any other HTML element, or any of the various other methods). In the intervening time, I haven't seen anything which indicates that's changed.
I agree that using an <abbr> element for this isn't what that element is specifically intended for (<abbr> is for explaining abbreviations), and that using <abbr> in this way is something that semantic purists don't like. However, it's, again, an intentional trade-off to sacrifice what is, mostly, a philosophical HTML programming issue for the greater support of <abbr> by screenreaders.
As to the implication that using <abbr> for non-abbreviation uses is an accessibility issue: It is, to an extent. Screenreaders may identify it to the user as the explanation of an abbreviation. However, IMO, it's better that they do that and give the user the information, rather than completely ignore the element and not give the user the information, which is what happens with other methods of displaying a tooltip.
As to MOS:ACCESS: MOS:ACCESS says 'Do not use techniques that require interaction to provide information, such as tooltips or any other "hover" text'. Given that the intent of this template is to display additional information upon the user mousing-over the reference designators, the template is fundamentally at odds with that direction, no matter how it's implemented. This disparity is fundamental to this template and can't be resolved while still maintaining the same functionality (show something on mouseover). It's not an issue that's specific to using <abbr>.
So, basically, if you have/know of data that indicates using some other method of generating a tooltip effect is now more consistently and appropriately supported by accessibility tools (e.g. screenreaders), then I'm happy to put in the effort to change the template. But, everything I've seen indicates that <abbr> is the best option. OTOH, I haven't done a significant search of screenreader capabilities in quite a while, thus things may have changed. — Makyen (talk) 08:31, 12 July 2018 (UTC)[reply]
Thank you for explaining your rationale, Makyen; I suspected that you had good reason to implement this template with {{abbr}} and I now understand why you have. I am not personally aware of any such developments, though I do not have much expertise on these matters, anyway. I do know of a few users who may be, but rather than pinging them, do you think it would be better to open this up to further input, such as at WT:ACCESS or WT:WPACCESS? Perhaps someone there can provide some updates if any are available, or at least suggest a more accessible implementation that accounts for your considerations. —Nøkkenbuer (talkcontribs) 13:45, 13 July 2018 (UTC)[reply]