Template talk:R-phrase

From Wikipedia, the free encyclopedia
Jump to: navigation, search

From User talk:Bryan Derksen[edit]

I have nominated these templates for deletion; see Wikipedia:Templates for deletion/Log/2007 November 30. Hesperian 03:43, 30 November 2007 (UTC)

I think you've missed the point of what these templates actually do. I've explained at the deletion discussion; they're not really for visual styling, they're for providing tooltips. Bryan Derksen (talk) 03:51, 30 November 2007 (UTC)
Well that's even worse! Wikipedia:Accessibility recommends against the use of tooltips as violating principles of web accessibility. Hesperian 04:00, 30 November 2007 (UTC)
The template doesn't depend on the user being able to access tooltips. It's a supplemental piece of information. I still don't see how Wikipedia would be improved by removing them. Bryan Derksen (talk) 04:02, 30 November 2007 (UTC)
If they are removed, all uses will revert to vanilla text (an improvement), and explanations of the phrase, when needed, will be provided in the text rather than in a tooltip (an improvement). Hesperian 04:07, 30 November 2007 (UTC)
Reverting to vanila text can already be done by editing the style attribute of the template, and if you'll check out the way this template is commonly used you'll see that it wouldn't be an improvement to include a full explanation with each one. They're used in infobox templates where space is at a premium. Bryan Derksen (talk) 04:11, 30 November 2007 (UTC)
Oh, and let's move this discussion fully over to the TfD page. No need to duplicate everything. Bryan Derksen (talk) 04:11, 30 November 2007 (UTC)
Yeah, I was thinking the same thing. Hesperian 04:20, 30 November 2007 (UTC)
And I think I'll let some third party contribute next, too. I don't mean to seem overly argumentative, I don't have a particular interest in R-phrases specifically, it's just that I did a whole bunch of work a few nights back standardizing these and it seems a shame to have the end result of that be the removal of functionality. :) Bryan Derksen (talk) 04:23, 30 November 2007 (UTC)
I understand; it is disappointing to have one's work discarded in this way.
I don't think you're being argumentative. Right now we are the main stakeholders in this discussion and it is only natural that we would participate in the discussion with enthuasiasm. A great many discussions like the one we've been having would have degenerated into an argument by now, but as far as I'm aware this one remains a rational, civil discussion. Hesperian 04:32, 30 November 2007 (UTC)
Since consensus was to keep, and I still felt strongly that the lack of web accessibility was a problem, I added spans into the List of R-phrases,[1] then converted the R-phrase template to include a #link into the list,[2] only to discover that the link target shadows the title attribute for tooltip purposes. To resolve this, I created redirects into the list with verbose titles like R1: Explosive when dry. Template:R-phrase now links to the list via these redirects, and the redirect titles come up on the tooltip. That way, you get your tooltip, and I get web-accessibility. I hope this makes sense to you.
If ever you chem guys get around to creating separate articles on each R-phrase (and I think you could, with expanded information on the nature of the hazard, standards for storage, transport and use, and a list of chemicals to which the R-phrase applies), then you can either overwrite the redirect with the article, or retarget the redirect at the article. Either way, you won't have to touch the templates.
Hesperian 05:37, 2 December 2007 (UTC)
Sounds like an excellent solution. I'll copy it when I get around to doing the S-phrase ones. :) Bryan Derksen 07:40, 2 December 2007 (UTC)
Ah, I see ViperSnake151 is already at work on that. I'll chip in on his effort by creating some redirects. Bryan Derksen 07:42, 2 December 2007 (UTC)

Incidentally, it is possible to override the link target tooltip, you have to put the span with the title attribute inside the link. {{cn}} used to do it. see? The markup ends up being a bit ugly though. Probably still better than creating redirects solely to act as tooltip text though.—Random832 18:26, 3 December 2007 (UTC)

Thanks Random. I agree that that is a better approach, because it lets us de-couple the link text from the link. But in this case I think the redirects are legitimate, and it is good to point into the list via them as they insulate the template against any change in target. i.e. if someone creates an article on an R-phrase, the redirect can be re-targetted. If we were linking directly into the list, we'd be stuffed.
Bryan, if you prefer the tooltip to say "Explosive when dry" rather than "R1: Explosive when dry", you could change {{R-phrase}} from
<span class="abbr">[[{{{2}}}: {{{1}}}|{{{2}}}]]</span>
to
[[{{{2}}}: {{{1}}}|<span class="abbr" title="{{{1}}}">{{{2}}}</span>]]
Hesperian 23:23, 3 December 2007 (UTC)
I have no idea what it should say, I'm not actually one of the "chem guys". I've just been gnoming my way through the template namespace for the past few months and came across a big bundle of templates that looked like they could use a little tidying up. I leave it to the more chemistry-knowledgeable to fill the blanks of the template in with the correct phrases. :) Bryan Derksen 00:37, 4 December 2007 (UTC)
Oh, okay. Me neither, so let's leave it at that. Hesperian 00:49, 4 December 2007 (UTC)
I am sorry, I see you guys have spent a lot of work here, but I am absolutely not satisfied with this solution. If you now look at e.g. the chembox in methanol, you see there a link 'R-phrases' and one for 'S-phrases' in the left column, which is a wikilink to the document. In the column to the right, there are now also links, which are completely superfluous. These boxes were meant to show tooltips only, as it does not fit the whole text of all the warnings (for some chemicals there are quite a few). I will discuss this with some other members of the wikiproject, but I do think the edits should be reverted to a version where it shows tooltips only. --Dirk Beetstra T C 11:18, 4 December 2007 (UTC)
Well, I'm happy either with the links or with the tooltips, so if it's a debate between those two options there's probably a better place to have it than my user talk page. I recommend Template talk:R-phrase, since that's the template where all the action's going to be. I'm going to copy and paste this discussion subthread there. Bryan Derksen 17:39, 4 December 2007 (UTC)

And after[edit]

I've now reverted back to the old versions. Not because they're necessarily better but simply because the discussion needs to know where it's starting from. This version (not exactly this template, but this styling) has been in use in various forms for well over two years now, so a couple of weeks of discussion won't hurt anyone. It uses a CSS element identified as abbr: it is not the the only use of this element, but is probably the most visible. If there are accessibility problems with this element they need to be treated globaly, not just on these templates. Let us not forget that tooltips are widely used on WP, and so they cannot be the only source of the problem. Physchim62 (talk) 18:15, 4 December 2007 (UTC)

Are you sure you want a span with the class "abbr" rather than the tag <abbr>? There are no CSS rules on .abbr, and it will not be treated specially by browsers (I have not checked for css rules on abbr, and it is treated specially by some browsers and has a semantic meaning per W3C —Random832 15:47, 6 December 2007 (UTC)

I am sorry, but what seems to be the problem here, that is what I don't understand yet. These templates are standing like this for 2 years, and now there is something with the standard of the span tags? Where does this give problems, and what is the recommended solution (and what is supported by the wikipedia software?)? --Dirk Beetstra T C 15:52, 6 December 2007 (UTC)

We don't know yet. Other people are too busy fighting other battles, I believe because they don't actually care about this problem. Physchim62 (talk) 16:27, 6 December 2007 (UTC)
There's caring enough about something to make a routine effort to improve it, and caring enough to keep fighting after other parties have reacted completely inappropriately.
It is true that things such as the abbr CSS element have appeared all over WP, and accessibility issues have been raised on a case-by-case basis, rather than globally, but that hardly suggests that they cannot be the only problem. The question is whether using tooltips, which require physical movement, is unfairly relying on a particular ability in order to impart information. How long the templates have existed is irrelevant, if the question hasn't already been considered. It is quite reasonable to say that if the information needs to be included, it should be included in a way that is accessible via a screen reader.
Personally, I am inclined to say that as long as the templates are only used in infoboxes alongside a link to List of R-phrases, it is not such a big deal, as the tooltip is only a bonus added to the accessible link. However, Hesperian's suggestions involving more explicit links are worth considering as even more beneficial. (Maybe even the separate articles idea - is that reasonable?)
If those ideas are rejected, I think the use of abbr<abbr> as well as/instead of the current code as sugggested above also has merit and should be considered. JPD (talk) 17:55, 6 December 2007 (UTC)
I don't know if the links to seperate articles are reasonable. Those articles would all be stubs, contain hardly any information more than the list that is linked to next to these. If the tooltips are the problem, I would suggest that the tooltips are just removed, and make the templates go completely. Personally I think that would be a bad ending, as I think these do add, wikipedia is not a paper encyclopedia, we can use the tooltips. By the way, the use of the tooltips is only discouraged in a guideline (in the header of that guideline, as in each guideline, it is stated that exceptions do exist, guidelines are not set in stone). I also do not see what is the problem with having them, as it is used in articles of chemicals for 2 years, and these articles have passed FA status with the items in it. Should things that are really wrong not be removed in such versions?
The only problem I can imagine, is that it has to be applied properly, according to the rules so that all (most) browsers can handle it. That is now above my knowledge of these tags, I hope that someone with more knowledge about that will drop by and clarify. --Dirk Beetstra T C 18:03, 6 December 2007 (UTC)
Beetstra, you make some good points, but the fact that it has gone through FA is rarely a reason not to discuss an issue that hasn't been brought up before. Similarly, the fact that it is only a guideline means that there are exceptions, not that the exceptions don't need to be discussed and justified. In my opinion, the question is whether the same information is adequately displayed to someone without tooltips, and anything else is a sidetrack. JPD (talk) 18:38, 6 December 2007 (UTC)

I agree, except that tooltips are used on every wikilink and many images already: I find it had to believe that tooltips themselves are the source of the accessibility problem.

As it is, these templates provide additional information for those who chose to use it, and are just as good as no tooltips at all for those who don't or can't use it. I really think that the question of accessibility should be addressed on Wikipedia talk:Accessibility (as it is beginning to be). Physchim62 (talk) 18:14, 6 December 2007 (UTC)

Incedentally, the current code states <span class="abbr">: I would be a strong supporter of having chemistry pages using the same solution as other pages for any problem involving abbr. Physchim62 (talk) 18:18, 6 December 2007 (UTC)

You are right - tooltips themselves are not a problem, but their use in text to provide information that isn't otherwise available is. The point about being as good as no tooltips at all is the key - as long as pages are being written for consideration for what it would be like without the tooltips, there shouldn't be a problem. Anyway, it is good that it is being discussed mmore globally now. I see that MediaWiki does not currently support <abbr>, but hopefully that will change eventually. JPD (talk) 18:38, 6 December 2007 (UTC)
The use of tooltips should be fine, provided that a wikilink to a more explanatory document are next to it. These elements are almost exclusively used in the following setup: "R-phrases: R1,R2". For people without accessibility problems the wikilink is there, and for them this is the same as "R-phrases: R1, R2", which is then again the same as a link in the text to NADH for both people with and without accessibility problems (most people have to click NADH to see what is behind it). People without the accessibility problems get a bit quicker to the information. Making things more accessible would be, that we encourage the software to support a tooltip on NADPH which contains a one-liner explanation what NADPH is, not forbid the use of tooltips altogether. --Dirk Beetstra T C 18:48, 6 December 2007 (UTC)

I've raised, on Wikipedia talk:Accessibility, the issue of what I think is a conflation of two different issues: How the information is actually presented (as the content of a "title" attribute on an element), and how you access it (by moving your mouse over that element). —Random832 18:23, 6 December 2007 (UTC)

I think that after discussion at that page it is fairly clear that the problem with the use of the "title" attribute in this way is if it is not accessible and used as a substitute for a more widely accessbile means of conveying the information. This leaves me with a few nagging doubts about this particular case. When the original idea of the templates was formed, and then the recent TfD debate, it has been suggested that it would be good for the reader to have on hand the full textual descriptions without having to follow the link, that not needing to open the static list is extremely useful, and that deleting them (which would make the infobox appear to everyone the way it already does for people who cannot access the "title" attribute) would lead to people trying to turn articles into MSDS pages. All of these (particularly the claims against deletion) imply that access to the textual descriptions is important, not just a nice touch. I think I'm slightly more open to the idea of the "middle ground" (where things are a nice touch, but not necessary) than Hesperian, but he does have a point to consider. At the very least, surely it would be more helpful to change the templates to link directly to the relevant part of the list as well as use a tooltip (removing the existing link, if this is overlinking), rather than simply having the tooltip and the link to the whole list? I'm not saying this is the best option, but it does seem liek a proposal worth considering as an improvement, whatever we think of the broader issues. JPD (talk) 17:44, 12 December 2007 (UTC)

Hmm, with overlinking I meant that there are sometimes a handfull of R and S sentences for one compound (4 each would not be too strange to encounter; e.g a 'simple' chemical like Methanol has 3 R sentences and 5 S sentences; For benzene it is 7 and 2 resp). Making every single instance a link would result in some cases 8 links to the document (plus two to the top of the document explaining what R and S sentences actually are), with sometimes only one line difference. What I think would really be an improvement is that we find a way of actually using tooltips (not leaving away an actual link nearby!), so that they are recognised by the people who read the page.
In my opinion, using tooltips is not a "bad thing (tm)", when used in a proper way. In stead of concealing information from readers it adds a quick and simple way of accessing information which would not fit in areas where space is an issue. But, a full link must be available for those where tooltips (or whichever gadget we are discussing) is not available.
This still leaves us with the problem, that for those that can not access the tooltip they have to click the link in the left column. But that same thing is true for the NFPA-704 diamond (box above the R and S phrases in Methanol, and for e.g. the flashpoint (just below it). People also there have to click the link in the left column to get to know what it depicts/means. Making it a clickable link would result in people clicking it, and having to go back and forth, while the tooltip, when recognisable as such, does not need those actions for the majority of people. --Dirk Beetstra T C 19:03, 12 December 2007 (UTC)
I haven't said there is anything wrong with tooltips in themselves. They are definitely useful for anyone who is able to use them. The question is whether we can not jsut have tooltips, but also improve the layout with respect to a situation where the title attribute is inaccessible. To answer this, we really should ignore the tooltips and ask ourselves - would we be satisfied with only the link(s) to the top of List of R-phrases (and S-phrases). The opinions I have quoted from two years ago and the recent deletion debate suggest that many people wouldn't really be satisfied with that. In contrast, noone has suggested that the links to NFPA 704 and flash point are not enough, as far as I know. The difference is probably that flash point is a single common term that would be well known by those using it and the diamond is similarly well designed so that it's meanings are easily understood once you are used to it, whereas the phrases are on the whole used as references, rather than memorised. I could be wrong about these difference, but it seems fairly clear from the discussion that such a difference exists, and that the phrases could do with more than just a link to a static list, if possible.
This leads us to the possible solutions/improvements. You have a good point about overlinking, but I think this is a matter of weighing up different options, which have different pros and cons. Is it better to have a lot of links, which sometimes link to places only a line a apart, or to have only one link to the whole list, which usually requires a certain amount of searching through the list? I would say the former, especially since as far as I understand, the problems caused by overlinking are less significant in an infobox than in prose. JPD (talk) 15:34, 13 December 2007 (UTC)
(Sorry, don't have time for a full answer, may continue later) What I think is, that when you make the numbers clickable, no one will use the tooltips, and these tooltips then become completely superfluous. So then the numbers in the right column are just similar to the link in the left column, though a bit more specific. So I guess it is reasonable to choose between either links or tooltips or plain text, ignoring the option 'links and tooltips'. --Dirk Beetstra T C 15:44, 13 December 2007 (UTC)
I would use the tooltips even if they were also links, for the reasons that you have pointed out very clearly. Is your prediction based simply on the idea that most people would not realise that the tooltips were there? JPD (talk) 16:05, 13 December 2007 (UTC)
Yes, though that is also true now. The mediawiki software does not disable the tags needed for tooltips (disabling is not needed as they are technically completely harmless, they don't 'physically' break anything or can be used to execute malicious code), but AFAIK there is not a place where there is a discussion on how they would optimally be used, except for a guideline that says that techniques that require physical action like tooltips and hover text should not be used (though clicking a wikilink to get more information would also be a physical action). I see that {{abbrlink}} is used in e.g. this document (take a sec to hover here). The only thing there is, it looks strange, and I guess that a newbie, or even established editors, who see that don't understand what is going on there. I guess it is time for some community input, do we consider making them all links 'overlinking', and do we really think that people will realise the hovertext, or that they will just click? --Dirk Beetstra T C 17:20, 13 December 2007 (UTC)
The mediawiki software does not disable , true, although I don't think tooltips were considered when that decision was made. The software, actually, probably the skin javascripts, actually enable tooltips, and we can see that they are not a bad thing in themselves. Comparing them with clicking a wikilink, is, however, a red herring. As I said in the other discussion, I can access all the wikilinks without touching the mouse, but I cannot access the title attribute text without the mouse. It would be good to know how well screen readers and other accessibility tools currently do deal with the title text, but as you say, that is for central discussion.
All the central discussion that I have seen suggests that the tooltips are not particularly accessible in general, and so we have the question of what to do in this particular case. You have suggested that providing links for those with accessability problems as well as the tooltips via the title attribute would tend to remove the benefits of the tooltips at least for those who don't already know the tooltips were there. That is a very good point. As I see it, this leaves us in a situation where there are two alternatives that are very hard to decide between. JPD (talk) 14:11, 14 December 2007 (UTC)

Edit request[edit]

{{editprotected}} There seems to be no consensus for this edit. Physchim62 (talk) 13:00, 14 December 2007 (UTC)

That is probably true at this point. Then again, there is no consensus to revert it either, and the template is not protected as a result of a content dispute. Editing and discussion should continue as normal for high-risk templates. Being currently undecided myself, I am not going to change it to either version. JPD (talk) 14:11, 14 December 2007 (UTC)
To a non technical person, can someone explain the difference between the two versions in functional terms? Orderinchaos 15:06, 14 December 2007 (UTC)
The first was a color formatting with "title" attribute explaining the abbreviation, the other is a more straightforward link to the abbreviations list. Circeus (talk) 15:31, 14 December 2007 (UTC)
N Not done Editprotected requests to change to a particular version in an edit war are too controversial (I made this mistake once). Try asking at WP:RFPP or the admins' noticeboard instead. --ais523 15:36, 14 December 2007 (UTC)
Actually, the "other" is a link to a redirect which should prompt the tooltip to include the explanation, together with a "title" attribute explaining the abbreviation. This could be overkill, purely in terms of the code used. Apart from that, unless the redirects deserve articles of their own, this result can probably be better achieved with something along the lines of {{abbrlink}}. Then we have the question of whether such a solution is actually desirable, which is one of the issues being discussed in the previous section. JPD (talk) 15:39, 14 December 2007 (UTC)
I've added the formatting to the linked version as a potential compromise. Physchim, is there any reason _not_ to link? [edit conflict] @JPD: It's been suggested that some of the redirects may eventually deserve articles of their own, but I'm not sure I buy that. —Random832 15:41, 14 December 2007 (UTC)
This is now almost identical to the {{abbrlink}} solution. As for reasons not to link - that is I and Dirk were discussing above. Dirk has raised the objection that the links may make it less likely for users to realise that they don't need to follow the link if they are able to access the title text via tooltips or other means. I have no opinion on the redirects becoming articles question - I simply mentioned it to acknowledge the fact that it had been suggested. JPD (talk) 15:49, 14 December 2007 (UTC)
The links are superfluous, as these templates are only used in conjunction with a link to List of R-phrases or List of S-phrases: as such, the second link adds no value, and is discouraged by Wikipedia:Accessibility#Links. Physchim62 (talk) 15:53, 14 December 2007 (UTC)
As discussed above, superfluity could be dealt with by removing the less useful List of R-phrases links, rather than not having these. Overlinking, including the issues of new lines, is a problem in prose, but not really in an infobox. JPD (talk) 15:57, 14 December 2007 (UTC)
Erm, in what way is the first List of R-phrases link less useful than the others? Physchim62 (talk) 16:02, 14 December 2007 (UTC)
Firstly, the others, whether in the form of redirects or simple linnks to anchors, take you directly to the relevant part of the list, rather than the top. Secondly, they allow users to navigate to the individual R-phrases and see the accompanying text in ways that cannot be done with the original template. This is definitely true on my browser, although I don't know whether it also applies when using screen readers and so on. JPD (talk) 16:10, 14 December 2007 (UTC)
My personal opinion (and it is only that) is that these phrases will never merit articles of their own. Perhaps we might have articles on the general classifications one day, but even then it is difficult to write articles which don't just parrot the directive. Physchim62 (talk) 16:01, 14 December 2007 (UTC)

I still don't see that if we implement links and tooltips, that the tooltips are going to be used, I simply do not believe anyone will use them. The general way will be 'click to see what we get'. Therefore, having a link in the left column will be more than enough. It is for me either the choice of 'no link, no tooltip', or 'no link, tooltip' (the former being plain text, the link in the left column gives more info, the latter giving the same information, but for most people giving a bit extra in form of a tooltip. Also, I don't think that a number of the R-sentences will become articles, at all, they are short warnings, where the words in the warnings can have an own wikilink ('explosive when dry'). In summary, I think that wikimedia should make it either into an issue whether tooltips should be a recognisable function, otherwise it is either a question of overlinking, or no link at all. And if it is that choice, I'd prefer the tooltip, as that does for most people just give a bit more info.

Just as a notice, the NFPA-704 diamond, which is just above the R and S sentences in e.g. Methanol also uses tooltips. Now, if the are going to be turned into links as well, which would be precedented if we do it with this, they simply don't look like NFPA-diamonds anymore, they turn into links, which are formatted as the users ha. I think it would be wise to make that choice on that part of the chembox as well. Are we going to give up readability/functionality of certain parts (although not on this specific template) because of this? --Dirk Beetstra T C 16:36, 14 December 2007 (UTC)

Several people have suggested that "a link in the left column" is not "more than enough", that is why the tooltips were used. I don't understand what you mean by "whether tooltips should be a reconisable function". I think the tooltips are currently provided by something in CSS/the JS skin files, with the original intention of being used in completely uncontroversial contexts such as links (including images, which are links to their Image: pages). We happen to be able to make use of this functionality in other contexts, providing extra benefits to most users. The question should not be whether this is acceptable in general, but does each instance of it ignore a solution which could also provide benefits to the other users. In this case, the question becomes do we use the solution which provides a direct link to everyone and an almost hidden tooltip for most, or the solution where those with less access rely on the link to the top of the page, but the tooltip for most is slightly more obvious. It is a matter of weighing up the limited benefit of a direct link (and other minor things such as keyboard access in normal browsers) for those with access problems against the limited benefit of not having a link to distract some from the presence of the title text. Which is the more significant/relevant?
It would be unwise to take any solution as too much of a precedent. Each situation is different and has different readability/functionality/accessability issues. Taking the diamond as the example, I can see several options, including:
  1. Leaving it alone, arguing that the "abbreviation" in this case is easily remebered once seen and/or that the individual meanings are best explained by the full description of the system provided by the link to the left.
  2. Providing links, but forcing the colour to be black (this can be done, I am not sure about removing any other things added by CSS), arguing that in this case the visual look of the diamond is more important than making the link obvious, for reasons similar to number 1, among others.
Whether either of these approaches is taken, or any other, we can see that the issues involved are not the same as with the R-phrases, which are individual abrreviations not following a pattern, and without any formatting requirements. JPD (talk) 18:35, 14 December 2007 (UTC)
Does anyone mind if I contact Graham87 for an opinion? He uses a screen reader and is probably in a better position than any of us to answer on accessibility issues. Orderinchaos 15:15, 18 December 2007 (UTC)
That sounds like a good idea. Are screen readers the only things we chould be concerned about? JPD (talk) 13:31, 26 December 2007 (UTC)

Documentation[edit]

Please could someone add template documentation, with the purpose, use etc.?

Many thanks! --Drum guy (talk) 23:02, 2 July 2008 (UTC)

interwiki[edit]

{{editprotected}} Please add interwiki link [[ja:Template:R-phrase]], or create documentation subpage? --fryed-peach (talk) 15:38, 29 September 2008 (UTC)

I added the documentation page, you can create it and put the interwiki there. - Trevor MacInnis (Contribs) 16:21, 29 September 2008 (UTC)
 Done. Interwiki added. Physchim62 (talk) 16:24, 29 September 2008 (UTC)
Thanks! --fryed-peach (talk) 17:58, 29 September 2008 (UTC)