Template talk:Audio

white-space: nowrap
Is there a reason for the nowrap declaration? It gives odd rendering on some wider pronunciations, e.g. 1, 2, 3, 4, 5 (resize the browser window until you see the problem). --MinorContributor (talk) 14:46, 8 July 2009 (UTC)


 * I understand that the nowrap is meant to tie the speaker icon and the first word together; but it actually ties all the words, resulting in odd line-breaks. I notice that two of my examples have been edited to use a different audio template. --MinorContributor (talk) 17:32, 5 April 2010 (UTC)


 * You're right; I noticed the same problem. . (For future reference, was the edit that introduced it) --Waldir talk 15:54, 15 July 2011 (UTC)

Apply hAudio microformat
Please make the following changes, to apply the hAudio microformat:



to:



No visual changes will occur and the category is hidden. For background see the microformats project. Andy Mabbett (User: Pigsonthewing ); Andy's talk; Andy's edits 15:14, 5 April 2010 (UTC)


 * I have a few questions.
 * fn/album is a required element and should be a title/short description of the audio sample. But here it is just the link to the audio file itself, and the "About this sound" tooltip right ? That doesn't seem correct to men. This doesn't seem as a correct usage of the hAudio format to me.
 * Wikipedia doesn't in general include descriptions of its files in the article content, unless absolutely related (tracklists and samples on Artist/album pages). In other cases, we usually reserve that for the File description page. I think we should do that here as well. Unless there is a hAudio tag "Audio version of page" and "audio version of page title", i don't think we should tag these audio and Spoken Wikipedia. Any other metadata is pointless and incorrect in my opinion for these files. —Th e DJ (talk • contribs) 15:37, 5 April 2010 (UTC)


 * Your assumptions are not correct. As pointed out previously, such microformats describe the wrapped content, not the whole page. The "fn" would be the text attribute of the template. For example, in the examples on this template's documentation page, the emitted "fn" of the audio file would be "pronunciation". That seems reasonable to me; and accords with the microformat specification. No "audio version of page" is involved; no other metadata (apart from the implied fact that the item referred to is an audio file) is emitted.. Andy Mabbett (User: Pigsonthewing ); Andy's talk; Andy's edits 15:50, 5 April 2010 (UTC)
 * Hmm, I can't see the value in this case. "Pronunciation of theword" would be useful, but now it is contextless metadata (at least, as contextless as without the tag). That's why I said that if there was a marker to note that the context is the entire page/title or something, it would be useful, but not like this. As stated before, I am a big opponent of incorrect or meaningless metadata. —Th e DJ (talk • contribs) 17:54, 5 April 2010 (UTC)
 * You're assuming that the metadata is meaningless. That's not the case. Consider, for instance, its use in Dead Sea or Stab-in-the-back legend. Andy Mabbett (User: Pigsonthewing ); Andy's talk; Andy's edits 18:45, 5 April 2010 (UTC)

Discussion seems to be over; request re-activated. Andy Mabbett (User: Pigsonthewing ); Andy's talk; Andy's edits 23:24, 14 May 2010 (UTC)
 * The discussion may have waned, but at the moment you do not seem to have support for this change. I'll ask TheDJ to comment again. &mdash; Martin (MSGJ · talk) 14:44, 17 May 2010 (UTC)
 * I still object, but since I seem to be the only one to care about this useless clutter in our HTML pages, I don't see what else to do about it. I'm not gonna run an RFC to stop this. —Th e DJ (talk • contribs) 15:24, 17 May 2010 (UTC)
 * One proponent and one opponent does not make a consensus. I've disabled the request again. &mdash; Martin (MSGJ · talk) 10:30, 19 May 2010 (UTC)


 * FYI: VPP. – xeno talk 13:37, 19 May 2010 (UTC)

Request reactivated. Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 13:04, 11 January 2012 (UTC)
 * Declined. There is no consensus for the proposed edit. Please establish consensus prior to making the request.  Sandstein   10:09, 28 January 2012 (UTC)
 * Does anyone object to this change? Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 15:47, 1 February 2012 (UTC)
 * No objections in over three weeks; request reactivated. Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 23:10, 25 February 2012 (UTC)
 * Red information icon with gradient background.svg Not done: Still no consensus. In the face of past objections, applying WP:SILENCE to the past three weeks seems questionable at best. Anomie⚔ 04:45, 27 February 2012 (UTC)
 * How long do you suggest we give it, or how else do we determine consensus, then? Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 15:07, 27 February 2012 (UTC)

There have been no objections, in over a year. Surely long enough. Please apply the change, Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 16:20, 28 March 2013 (UTC)
 * Red information icon with gradient background.svg Not done: I was on the fence about whether or not to fulfil this, but despite the long time that has elapsed since the original request, I doubt that the previous objections to this have gone away. This question really needs to be brought to a wider audience before we can judge whether there is a consensus to implement it. Perhaps start a new thread on WP:VPT or WP:VPR? — Mr. Stradivarius  ♪ talk ♪ 15:04, 29 March 2013 (UTC)


 * I have no objections to adding the extra classes. I do have two questions however:
 * Why are you maintaining the pseudo "Image" and "Media" namespaces instead of changing them to "File"?
 * What is the expectations and intent of adding the categorization?
 * — User:Technical 13  ( C • M • Click to learn how to view this signature as intended ) 17:25, 29 March 2013 (UTC)
 * Thank you. Happy for (1) to be changed. (2) is for tracking, in keeping with other microformat-emitting templates. Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 17:55, 29 March 2013 (UTC)
 * Which other templates? Can you link some of the other templates/categories? Category:Articles with hAudio microformats — User:Technical 13   ( C • M • Click to learn how to view this signature as intended ) 17:58, 29 March 2013 (UTC)
 * See lists at WikiProject Microformats Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 18:58, 29 March 2013 (UTC)


 * So the revised proposal is:
 * Correct? What was to original opposition? — User:Technical 13   ( C • M • Click to learn how to view this signature as intended ) 19:06, 29 March 2013 (UTC)
 * Yes; that looks correct. Thank you again. I'm at a loss to understand The DJs objections, which are in this section, dated three years ago. The only other objections seem to be about process. Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 19:16, 29 March 2013 (UTC)
 * [[Image:Artículo bueno.svg|18px|link=|alt= &#x2714; ]] — User:Technical 13  ( C • M • Click to learn how to view this signature as intended ) gives his support for this section's subject at 19:21, 29 March 2013 (UTC)

Please apply the "revised proposal" from Technical 13, just above this comment. Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 18:52, 17 May 2013 (UTC)

✅ Given that the last objection was in 2010 and that in his/her last comment The DJ seems (to me) to have softened in his/her objection. Let me know if anything in the code I inserted is incorrect. -- RA (talk) 20:46, 20 May 2013 (UTC)
 * Thank you. Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 22:24, 20 May 2013 (UTC)

A problem has arisen in the change of "media:" to "file:", See below and Wikipedia talk:Non-free content. Thincat (talk) 14:19, 25 May 2013 (UTC)

Italian link
The italian template isn't more Template:Audio but Template:Link Audio --Razzairpina (talk) 11:00, 21 April 2010 (UTC)
 * You can update the interwiki link yourself on Template:Audio/doc. &mdash; Martin (MSGJ · talk) 16:37, 19 May 2010 (UTC)

:Image:
Use :File: instead of :Image: emijrp (talk) 11:17, 10 September 2010 (UTC)

Extra nbsp in /doc
Very minor point:

The example involving Bordeaux includes this text:

& nbsp ;) is a port city

where you have a nbsp inside the parentheses, and it's visible as a gratuitous space on the main page.

Why is it a requirement here? Varlaam (talk) 16:46, 12 July 2012 (UTC)
 * It wasn't just in the doc, the same thing happened in actual use of the template when printing. I fixed it, and updated the doc with a new example since the file previously used was deleted from Commons. Anomie⚔ 17:43, 12 July 2012 (UTC)
 * ✅. Thank you, Anomie. I think we all know you as your doppelgänger, Anomiebot, which is a reliable little bot.
 * Cheers, Varlaam (talk) 19:09, 12 July 2012 (UTC)

Something's wrong with &amp;nbsp;
Hi. There are instances where the page breaks soon after the speaker icon, and a space is visible at the beginning of the next line, which looks wrong. See for example Carl Linnaeus (using Firefox, try resizing until the break is in the right place). Thanks. 220.246.157.2 (talk) 07:58, 19 August 2012 (UTC)

WP:NFCC problem
Due to a change to this template, lots of files suddenly show up as unused. This means that lots of audio files may be deleted as "orphaned fair use". See Wikipedia talk:Non-free content for a discussion related to this. --Stefan2 (talk) 21:52, 24 May 2013 (UTC)

Template-protected edit request on 2 November 2015
Please remove  and add   ending just after the no-break space. This way line breaks are allowed inside the link text, but not between the text and the speaker icon. Currently the text will not wrap even if it's very long, for example in the lead section at Nazi Party ("Nationalsozialistische Deutsche Arbeiterpartei" is wider than my mobile phone's screen in portrait). I've made the changes at User:Hairy Dude/Audio with a demonstration at User:Hairy Dude/sandbox.

Hairy Dude (talk) 15:20, 2 November 2015 (UTC)
 * What if we just removed the nowrap altogether? I'm not convinced your code would fix this issue. And I don't understand your test on User:Hairy Dude/sandbox because you're passing all sorts of spans and classes in the second parameter. &mdash; Martin (MSGJ · talk) 11:08, 3 November 2015 (UTC)
 * The span is just manually substed from lang-de, which uses this. I've removed it now since it isn't pertinent to this discussion (permalink). The classes don't affect styling (except they may force a Unicode font) and the other attributes tell screen readers and the like what language it is. I added a border to demonstrate that it doesn't wrap after the icon. As for removing the nowrap, there are several discussions above about adding it, so clearly editors feel the need for it. Hairy Dude (talk) 11:12, 11 November 2015 (UTC)
 * So the idea is that it will not break between the icon and the first word, but it can break after that? I would have expected the nbsp to achieve that by itself, but apparently not. By the way, the edit that introduced this seems to have unintentionally reintroduced some 2010 code back into the template, so I'm not sure it was based on a consensus discussion. &mdash; Martin (MSGJ · talk) 11:33, 11 November 2015 (UTC)
 * No further comments, so I have deployed the proposed code. &mdash; Martin (MSGJ · talk) 11:45, 12 November 2015 (UTC)

Speaker Icon
Why oh why is the speaker icon linking to the file?

For the life of me I couldn't figure out the link between the .ogg (linked to by "listen") and the actual file page. It turns out that link IS included, but using the speaker icon.

It never occurred to me to click (or hover over) the speaker icon since it is associated with sound.

We really need a better arrangement. If anything, the speaker icon should link to the listen link.

Obviously the file link should still be there, but not associated with the speaker icon.

CapnZapp (talk) 20:09, 11 March 2019 (UTC)
 * For what it's worth, some deprecated similar templates used a blue icon like Speakerlink.svg to indicate the icon provided a link. Maybe that's at least better than the black one? Nardog (talk) 14:57, 27 June 2019 (UTC)

What to do with MIDIs?
MIDI files can now be played just like any other file when shown via, as shown here, but not via  , which is the method this template uses. This means a MIDI can be played on its file description page, e.g. File:Beethoven Op. 33 no. 1.mid, but not from the main link this template generates, as in, which usually results in the browser downloading the MIDI file. Currently about 900 articles link to MIDI files using Audio, which is about 8% of all articles with the template.

So it seems it is more user-friendly for this template to link to the description page rather than the file itself when a MIDI is given, using Module:String to determine the file extension, as in. I'm wondering if this is a good idea. Nardog (talk) 12:29, 6 July 2019 (UTC)

Template-protected edit request on 28 March 2020
Please apply this diff from sandbox to add automatic categorization into Category:Articles containing audio clips, which is largely unused. —⁠andrybak (talk) 14:20, 28 March 2020 (UTC)
 * To clarify which is largely unused: after this edit to Template:Multi-listen start, the category will become much more populated. Previous categorization was done only manually. —⁠andrybak (talk) 15:12, 28 March 2020 (UTC)
 * That "audio clips" category currently has no documentation explaining why it exists, how it is populated, and how it is different from other, similar categories. Is there a discussion that you can link to that prompted these three edit requests? I am not objecting to your request, just seeking more information. As a template editor, I am responsible for ensuring that each template edit I perform, even on someone else's behalf, has a reasonable justification. – Jonesey95 (talk) 00:41, 29 March 2020 (UTC)
 * , there was no prior discussion. I was just going through categories in Category:Wikipedia maintenance, and noticed that Category:Articles containing video clips has over eight thousand pages, while Category:Articles containing audio clips at the time had less than ten. Populating it automatically by transclusions of audio templates in articles might be useful. —⁠andrybak (talk) 00:51, 29 March 2020 (UTC)
 * Andrybak: You realize that audio clips can be added to articles in other ways as well, not using a template, don't you? So the "usefulness" of that category is limited. Anyway, what exactly would its "usefulness"? -- Michael Bednarek (talk) 04:11, 29 March 2020 (UTC)
 * ❌ for now, procedure disabling the edit request. The category was created in August 2019 by a now-blocked user with no prior discussion. Please establish consensus at a venue like WP:VPT before filing another request. (Also centralize discussions, please.) Nardog (talk) 04:37, 29 March 2020 (UTC)
 * Nominated the category for deletion. —⁠andrybak (talk) 11:35, 6 April 2020 (UTC)

Clicking shouldn't open up an entirely new page
I'm sure that actually getting this resolved would probably require involving the WMF and thus take forever, but just to note it, having the behavior when you click on "listen" for a pronunciation be going to a new page is a terrible way for the UI to work. There's no reason we couldn't have it just play the audio on the article page. &#123;{u&#124; Sdkb  }&#125;  talk 05:19, 7 May 2021 (UTC)
 * This is T229169. Check out also my PlayAudioNow. Nardog (talk) 06:22, 7 May 2021 (UTC)
 * Thanks for the link; I'm glad this is at least pending on phab! And reader scripts don't count for anything in terms of reader-focused thinking as there's 0% chance readers will ever discover them, but it might make it easier for the developers to come up with something native. &#123;{u&#124; Sdkb  }&#125;  talk 06:35, 7 May 2021 (UTC)

Template shows up as text "audio speaker icon" in search results
This template shows up as the text "audio speaker icon" in some Google search results. For example, this is what I see when searching for "melamine": F35057027.

I suggest that we change  to , as the icon is purely decorative (per Manual of Style/Accessibility/Alternative text for images) – the accessible text is provided in the second parameter (usually "pronunciation" or "listen" etc., depending on the template).

(cc @Jonesey95, who added the alt text) Matma Rex talk 19:05, 18 April 2022 (UTC)
 * I actioned this initially thinking it was noncontroversial, but then self-reverted when I realized that MOS:BLANKALT says linked images must have a non-blank alt attribute to prevent empty links, which result in confusing announcements in screen readers. Granted, it says that in the context of links to the image itself, not links to somewhere else, but it would seem to maybe apply here. Could I solicit your perspective here?
 * Current version:  Loudspeaker.svg pronunciation of "Alabama"
 * No alt text:  Loudspeaker.svg pronunciation of "Alabama"
 * Is the latter problematic? --  Tamzin  [ cetacean needed ] (she/they) 19:40, 18 April 2022 (UTC)
 * Actually the version without the alt text is better in this case, because the image caption serves fine as the alt text; see my comment in this thread. I've reverted the page as such. Graham 87 02:44, 19 April 2022 (UTC)
 * Thanks. Marking this as ✅, then. Should MOS:BLANKALT (or MOS:ALT in general) be more clear about the relationship between alt text and captions in this regard? --  Tamzin  [ cetacean needed ] (she/they) 03:09, 19 April 2022 (UTC)
 * No worries; I've added a bit of info in the section about captions and nearby text. Graham 87 07:37, 19 April 2022 (UTC)
 * Thanks all! I must admit I didn't notice at first that the icon had a different link. Matma Rex talk 17:35, 19 April 2022 (UTC)

Template-protected edit request on 31 August 2022
Can anyone please change help  to  help  ? I have done it in the sandbox. 78.79.182.254 (talk) 23:58, 31 August 2022 (UTC)
 * Red information icon with gradient background.svg Not done: per WP:NOTBROKEN.  P.I. Ellsworth &thinsp;, ed.  put'r there 00:27, 1 September 2022 (UTC)

Leading whitespace in second argument produces code block
currently results in an ugly code block due to the space before “listen” (example: ). Should the template trim the second argument before passing it into ? (I noticed this at Special:Diff/1180314752 – I assume that looked fine before the change to Phonos.) Lucas Werkmeister (talk) 18:37, 16 October 2023 (UTC)
 * Fixed with trim. The underlying bug remains unfixed. – Jonesey95 (talk) 21:06, 16 October 2023 (UTC)
 * @Jonesey95: The underlying bug is now fixed, do you want to revert the fix here? Lucas Werkmeister (talk) 12:08, 25 October 2023 (UTC)
 * I already have. Nardog (talk) 12:19, 25 October 2023 (UTC)
 * Alright, my bad for not checking :) thanks both! Lucas Werkmeister (talk) 17:23, 25 October 2023 (UTC)