This is an archive of past discussions about Template:Infobox election. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page.
By replacing the border-bottom: 6px solid #{{{color1}}} lines of code for colour handling with border-bottom: 6px solid #{{#sub:{{{color1}}}|-6}}, the template can now be used with the {{party color}} template, by allowing values starting with #.
Not done for now: @Kingdom of Baustralia Why does this change need to occur. If the parameter |party1= is used, it will automatically get the value of {{Party color}}. Along with this, why only change |color1= when there is also a |color2= and |color3=? Please provide some examples of when this would be useful as well as make your requested changes to the templates's sandbox first; see WP:TESTCASES. Terasail[✉️]07:01, 19 January 2023 (UTC)
@Terasail: This is a valid request as sometimes a party uses a different colour to its usual one for an election, or changed its colour, so another colour (from the party colours module) needs to be used. I agree this change is needed and would be helpful. An example of where it would be used is 2019 Austrian legislative election, where the Austrian People's Party did not use their usual black colour and it would be useful to call it via {{party color|Austrian People's Party (2017)}} rather than it being hardcoded as a colour. Cheers, Number5719:30, 19 January 2023 (UTC)
Done @Kingdom of Baustralia @Number 57: I used gsub so that it will also work with 3 character hex codes (#FFF). Let me know if there is anything wrong with it but you should be able to add both templates, and hex codes with # as the parameter. I checked the testcases and didn't notice any difference apart from #3 which was showing the correct change. Terasail[✉️]21:48, 19 January 2023 (UTC)
@Terasail: It doesn't seem to be working properly. I added the party colour template at the Austrian election article. It should be showing colour #63C3D0 (which is what is in the module), but it appears to be #597fcd... Number5722:30, 19 January 2023 (UTC)
I am going to reopen the request incase anyone else wants to do this... I can't get this to work with Module:String or Module:Ustring. They have a wondeful habbit of adding a 35 ('#' character number) on the front of the output which ruins the color. I must be doing something stupid but I just can't see what, its been a hour and I got nowhere... Terasail[✉️]23:21, 19 January 2023 (UTC)
It's only in the sandbox. I was hoping that another pair of eyes would look at it before I broke a bunch of articles. If you preview that Austrian article using {{Infobox election/sandbox}}, you should see a color under Herr Kurz. – Jonesey95 (talk) 23:57, 19 January 2023 (UTC)
Please add "leaders_seat" as a parameter for parliamentary elections. This is necessary for elections in many countries (e.g Australia). I do recall it formerly existing, but it for some reason disappeared. Can someone please add it back as soon as possible? It should go under the "party" parameter and the label should say "Leader's seat". Thanks! Thiscouldbeauser (talk) 07:07, 8 February 2023 (UTC)
home_state parameter is important for American elections (presidential only), because the constitution mandates that presidential electors from one state cannot cast their electoral votes for persons of the same state in both the presidential and vice-presidential ballot. —CX Zoom[he/him](let's talk • {C•X})10:58, 8 February 2023 (UTC)
Broken template?
I've noticed that the 'leaders_seats' and 'leader_since' are no longer part of the infobox, leaving a lot of these infobox entries orphaned across quite a lot election pages; is the template broken? BitterGiant (talk) 16:00, 23 February 2023 (UTC)
The parameter called "Swing" actually describes vote change. The two may be interchangeable in some territories but they are definitely not in others. See, for example, Swing (United Kingdom). I suggest the label be changed to the more literally descriptive "Vote change" to avoid ambiguity. Utilisateur19911 (talk) 07:46, 1 April 2023 (UTC)
3x4.svg
This template is now showing a weird image "File:3x4.svg" when only one candidate is listed in the infobox (such as in unopposed elections). Anyone know why this is? Kiwichris (talk) 03:17, 1 April 2023 (UTC)
Where are you seeing this? This could be because I recently requested that when a bot removes images from the infobox as NFCC violations (which happens regularly), they are replaced with 3x4.svg to avoid messing up the infobox (if no image is present for , it can compress that column to the widest word used). I'm guessing this might have happened on an article where there was only one image in the infobox? Number5715:05, 1 April 2023 (UTC)
I am not strictly opposed to this, but it would result in that link showing up multiple times in the same infobox (see the UK example). Is that a desired outcome? Primefac (talk) 07:50, 19 September 2023 (UTC)
Council Infobox
In cases where it is used for an individual council election, should we use the overall party leader or the leader of that councils party group TheHaloVeteran2 (talk) 16:48, 15 November 2023 (UTC)
IMO it should be the leader of the party for the election in question, so it would be the local leader. Cheers, Number5720:26, 15 November 2023 (UTC)
Template-protected edit request on 22 November 2023
Not done Alliances are between parties. There are seats where alliance members have friendly fight. All the rules and guidelines laid for election articles ask us to use parties only. For example - MOS:INDELECT states Only those parties that are covered by Reliable Media as a major contender for winning that election are listed in the infobox. It says parties not alliances. If any admin or senior editor disagrees, then I shall be happy to be corrected. ShaanSenguptaTalk09:28, 22 November 2023 (UTC)
What is the difference between nominee and candidate?
I occasionally see infoboxes being changed from nominee to candidate and vice versa, and there seems no hard-and-fast rules about which term is appropriate. Are they just different terms for the same thing, or is there actually a difference? If the latter, can we create a clear definition of when to use each? Number5722:26, 19 January 2024 (UTC)
This usage may vary by country, but in US presidential elections, there are two major parties, and until the party's convention a few months before the election, there are multiple candidates in each party. At the convention, the party chooses a nominee, at which point each party has only one candidate for president. See United States presidential nominating convention for excruciating details. – Jonesey95 (talk) 23:07, 19 January 2024 (UTC)
Candidate image size when viewing election pages on mobile
I have noticed that when viewing the election infobox on mobile, candidate image sizes are always of unequal size (which seems like a bug to me). It seems like whichever candiate is represented by a blue colour gets a larger image Can anyone replicate it?
@Oliverwinton: This has been a problem for a while, but I am not sure the infobox code is the problem (as it sets consistent sizes). It might be worth reporting it as a bug via the route detailed at WP:BUGS. Number5714:06, 20 January 2024 (UTC)
Proposed change to the before/after section
I would like to propose we change the final section of the infobox so that instead of the defaults being "[Title] before election" and "Elected [title]", the default is "[Title] before election" and "[Title] after election".
The default of "Elected [title]" for the post-election situation doesn't work for most parliamentary elections as the Prime Minister or whatever other postholder is mentioned is not generally elected to that position. This results in a huge number of infoboxes having to correct it by using the "posttitle" parameter. Defaulting to "[Title] before election" and "[Title] after election" would be neutral and correct, and avoid having to add a correcting parameter to many articles (or edits like this where the entire section gets removed because the wording is wrong). Cheers, Number5720:24, 23 January 2024 (UTC)
With very few exceptions, there is no sitting MP immediately before a by-election: that is why an election is needed. Even at a general election, the parliament is dissolved, therefpre MPs cease to be such. It is not reasonable to state, before an election, that the MP before an election is a person who died some weeks previously. Suggest rename this field to Previous MP. As an aside, wikilinking MP twice on the same row, in a context where it can be reasonably assumed that the reader knows what that is, seems something of overkill. Kevin McE (talk) 13:43, 13 February 2024 (UTC)
I assume this is in relation to Special:Diff/1206896902. I think it's an argument of semantics, and as such I don't really have an opinion on the matter (I mean, really, there isn't much difference between "X was the previous MP" and "Y was the MP before this election"). Primefac (talk) 13:55, 13 February 2024 (UTC)
Absolutely it is semantic, there is a difference in meaning inasmuch as "before" carries an implication of "up to the time of", which is absent from "previous". Kevin McE (talk) 10:05, 14 February 2024 (UTC)
Proposal for automatically adding short descriptions to this template
I would like to propose that we add support to the template for alternative labels for the party field. Especially in elections to non-governmental bodies, it is common for there to be party-like entities that aren't referred to with the word "party".
For example, in elections to the General Synod of the Church of Sweden (see, e.g., 2021), they use the term "nominating group" because, while some of the nominating groups are political parties (the same parties as in Swedish parliamentary elections), other nominating groups are not.[a] Or, for another example, in many trade unions, candidates run as part of a "slate" (see, e.g., 2021 Teamsters election). Although slates are distinct from parties in that they don't typically exist over more than one electoral cycle, they serve the same function in the context of that election.
It is, of course, already possible to get a custom label using auxiliary rows (1blank, 1data1); however, this would put the name of the party-like entity at the bottom of all of the statistical data despite it being the first thing our readers are looking for in most cases. And this would be especially impractical in an article like 2021 Swedish Church Assembly elections as there are no leaders listed.
This edit request has been answered. Set the |answered= parameter to no to reactivate your request.
Looking at the past couple archives of this talk page, new topics that don't get a reply within the first day or two are never replied to, so I'll go ahead and add {{edit template-protected}}. Graham (talk) 05:25, 21 May 2024 (UTC)
Done, although it needed a slight tweak to default to simply 'Party' if nothing was entered (in the testcases it could be seen that all the examples without the new parameter were broken). Number5721:00, 21 May 2024 (UTC)
I added a necessary test case with an empty |party_label= and tweaked the code just a bit. I think it is all working now. – Jonesey95 (talk) 22:02, 21 May 2024 (UTC)
Notes
^This is an odd relic of the Church of Sweden having been a state church until the beginning of the 21st century.
I modified the last edit because articles like this one were picking up the unnamed parameters and using them for the flag. removing these unnamed parameters fix the strange Template:Country data independent at the top, but then left a blank row at the top. this is because if |country= is in the template but blank, then the #ifexist check still picks up Template:Country data which is a valid template. I put the "check for blank" back around this line and now it looks fine in both cases. Frietjes (talk) 15:32, 15 March 2024 (UTC)
The code seem to malfunction and data that should not be visible in GUI output seems to be visible and the information does not seem to be contained in designated area, I don't know what has happened perhaps some kind of new regulations imposed on templates can not put up with the actuality in programming scale. Cactus Ronin (talk) 18:03, 15 March 2024 (UTC)
Re the test case, do we know why using candidate and nominee do different things to the width of the colour bar? And also what is happening with the previous/next election links (why are they spilling off the edge of the infobox?). Cheers, Number5722:49, 15 March 2024 (UTC)
Also, can people remember to use the sandbox to test stuff, rather than risk breaking tens of thousands of articles... Number5722:51, 15 March 2024 (UTC)
This has messed up thousands of articles. Please test this kind of stuff in the sandbox first
FWIW I tested this on a local MediaWiki instance so please don't assume I didn't test this, but could you expand on what exactly broke? It looked fine to me on the testcases after I made the change - and it is a minor change that is only adding CSS.
The template is currently problematic as it is exhibiting bias, so I'm keen to understand what problem you are seeing with the two rules of CSS I added so I'm keen to fix it ASAP.
The initial edit you made to the infobox caused the images to be compressed horizontally. For example, the images at 2024 United States presidential election stayed the same height, but were compressed to about a third of their original width.
I'm not sure what you've done this time, but it causes the images to be really small (I think 80x80px) but also stretches the infobox to twice as wide as it should be.
Annoyingly I can't show this side-by-side, as if you put the two versions on the same page, the style from the sandbox interferes with the main version. However, compare User:Number 57/sandbox 3 (normal infobox with default size of 150x150px) with User:Number 57/sandbox 4 (sandbox) and you'll see what I mean.
Yes this was the intention of the change. It should aplly to Minerva but not Vector. Why do you consider that broken? Without this all the infoboxes are clipped by default on mobile and every candidate other than the first requires scrolling to view.
i was editing from a desktop device and testing both mobile and desktop experiences
Just to clarify, did you mean to fix the image to 80x80px? It's far too small on a computer screen. I am using Monobook btw. Cheers, Number5710:18, 19 April 2024 (UTC)
Okay I didn't realize we optimized templates for Monobook and Timeless. When reporting "breakage" it's helpful to know straight away if you are using non-default skin and specifically what you mean by breakage (my understanding of breakage is the page doesn't render at all).
I've updated the styles to not apply to Monobook and Timeless, I always forget they are responsive.
The behaviour for Minerva is expected - 80x80 is selected as typically a mobile browser will be upwards of 320px and assuming at least 3 candidates (plus the heading row) 80*4 = 320. On Minerva infoboxes are capped to 300px so they should probably be smaller but that didn't. I think we could go up to 100px if we wanted since typically the majority of devices these days are 400px. Feel free to increase to 100px in the styles in Template:Infobox_election/styles.css if you feel like that makes a better compromise.
I think ideally, we'd switch to a row based layout on lower resolution devices, and stack these vertically rather than horizontally but that seems like a larger change that might require change to the HTML or more drastic changes to the CSS? 🐸Jdlrobson (talk) 15:41, 19 April 2024 (UTC)
I agree that a switch to a fully vertically stacked layout (akin to the es and fr.wiki infoboxes) would make sense and make the infobox more flexible. Number5718:50, 19 April 2024 (UTC)
Hi there. Just want to ask if there's a new format of the infobox in the making. Went to a few election pages and there was a new format, but with the images displaced and with things not within the lines of the box, making it look disorganized and disproportionate.Tuesp1985 (talk) 21:44, 13 June 2024 (UTC)
Yes, the format looks different, with the images floating, in some cases with their sizes tampered, and a lot of spacing between the lines, which makes the infobox disproportionate. When I posted the topic, the template still had the former format, but it has now changed, with the US election example being weird.Tuesp1985 (talk) 22:09, 13 June 2024 (UTC)
A browser issue I don't think it is, as on Mozilla and Chrome I'm seeing the same issue. Maybe it's WP:THURSDAY issue, like you said. But, are you seeing now the changes?Tuesp1985 (talk) 22:17, 13 June 2024 (UTC)
All looks fine and normal to me; I'm using the legacy Vector, which got some major overhauls a week or so ago (they're rolling out the updates to the various skins). Primefac (talk) 22:22, 13 June 2024 (UTC)
This is apparently an unintended effect of a code change deployed today. It is being discussed at VPT in a multi-header thread. Bug reports have been filed. – Jonesey95 (talk) 00:24, 14 June 2024 (UTC)
Right, I've read the VPT threads and yeah reports have been filed. Let's see if the matter is resolved. Thanks for the info Jonesey95.Tuesp1985 (talk) 01:39, 14 June 2024 (UTC)
Thanks. Both of those look fine to me. I gave them a null edit in case a caching problem was manifesting on your end. – Jonesey95 (talk) 05:22, 17 June 2024 (UTC)
Proposal to change numbers up to ten
Hello. For the 2024 Cork City Council election page, ten parties/independent parties can be shown as gaining/losing seats from the previous 2019 Cork City Council election - for either losing all their seats, or gaining seats as a new party. As the box only can show nine parties, this unfortunately means that not every party/non-party elected/unelected can be shown in the box. It would be a great benefit if all ten figures could be in the box, which is why I would propose to increase it to ten. Lucky102 (talk) 02:28, 11 June 2024 (UTC)
This template gets ridiculously large with that many parties. What about just switching to Template:Infobox legislative election? Bondegezou (talk) 06:54, 11 June 2024 (UTC)
I always feel like the legislative election infobox is too sparse for 6-9 candidates, but the current infobox can't handle more than 3 candidates well. Have we ever tried borrowing the infobox from non-English Wikipedias? Example in Spanish.Closed Limelike Curves (talk) 02:54, 28 June 2024 (UTC)
RFC: Should elections include equal-ranked ballots in calculating vote shares?
Should elections include equal-ranked and truncated ballots when calculating vote shares? For example, should ballots marked A = B > C be included in calculating the vote share for A against B?
Support. The convention in the social choice literature on this topic is very clear: equal-ranked ballots need to be included, because they can affect the outcome of the election. This is particularly important for paired counting methods, because equal-ranking indicates indifference (which dilutes the margin of victory). Even for systems where equal-ranking two candidates does not affect the results, users should know what share of ballots were exhausted or ranked several candidates as tied. It is easy to calculate what the results of the election would have been if equal ranks were excluded, but not vice-versa. Closed Limelike Curves (talk) 04:14, 11 March 2024 (UTC)
Oppose for now on the basis that you've not explained adequately what you are seeking to do. I've read your comments at WT:E&R several times and I am still none the wiser to what the issue is here. Number5719:47, 11 March 2024 (UTC)
I'm trying to find consensus on a consistent standard for reporting ranked-choice voting results.
As an example, let's take the article on the 2011 Irish presidential election. The infobox says the "final round result" was 56.8% of the vote for Michael Higgins, against 35.5% of the vote for Sean Gallagher. These don't add up to 100%, because some voters have ballots that look like this:
Mitchell
McGuiness
All other candidates (equal)
"Any other candidate" votes make up the last 8%. The question is whether an infobox reporting "final round results" should include "all other candidates," or whether these votes should be excluded.
Currently, there is no standard, and infoboxes are inconsistent across articles. For example, 2009 Burlington mayoral election uses the opposite convention. "All other candidates" are 6.7% of votes, but these are discarded to report the margin as 51.5% to 48.5%, instead of as 48% to 45.2%.
This allows unscrupulous editors to manipulate the apparent margin of victory: a Purple party supporter might report an election they lost as having a margin of 30% to 20%, with 50% of voters being apathetic between the two (an unconvincing victory). Elsewhere, they could report the same election results, but with Purple as the winner, by saying Purple had 60% of the final-round vote. Closed Limelike Curves (talk) 21:24, 11 March 2024 (UTC)
I'm saying that in every round or matchup, the vote share should be equal to the number of votes for a candidate, divided by the total number of ballots (including those that, in the final round, show no further preferences). This is because those ballots can still affect the outcome under many voting systems. Closed Limelike Curves (talk) 07:12, 12 March 2024 (UTC)
There's not really a standard practice from reliable sources for this, because both numbers are correct; they just measure different things. The only time this causes a problem is when vote totals are inconsistent across infoboxes on Wikipedia, because excluding truncated ballots from some totals but not others leaves the door open for biases and confusion. Closed Limelike Curves (talk) 17:32, 12 March 2024 (UTC)
I think consistency in a series of articles about elections in the same place makes sense. I don’t think there’s a particular need for how we report Maltese elections to match how we report Australian elections if RS about the former do one thing and RS about the latter do another. I think instead of this very generic RfC, that most editors appear to be struggling to follow given the lack of activity in it, it would be more useful to examine specific cases. Bondegezou (talk) 12:55, 15 March 2024 (UTC)
It's more that the reliable sources differ between media sources and academic sources. Journalists reporting election results tend to drop these kinds of ballots. Academic sources (scientific journals) consistently include them.
By the way, I should note that this is actually an extremely that's created no fewer than 6 edit wars and I'm utterly sick and tired of it. I'm describing this policy as vaguely and generically as possible, without mentioning any specifics or specific articles, because if I don't it'll probably start a flame war and the entire debate will fall back on partisan lines. Closed Limelike Curves (talk) 18:34, 2 July 2024 (UTC)
Merging Parametres - "previous_election" and "previous_year", and "next_election" and "next_year"
Leaders seat/Leader since only to be mentioned if included in text?
Should this still be a requirement of the infobox's usage? Especially considering the longstanding usage of it in United Kingdom and Australian general/federal elections, none (or very few) of which include the seat in the plain text. It feels like an unnecessary caveat to add, and a newer addition to the documentation relatively speaking as well. I personally propose officially allowing the infobox to include the "leaders_seat" and "leader_since" parameters without the info being included in the plain text of the body, which seems to be unofficially allowed on dozens of articles already.
Essentially, codify that leader's seat and leader since should be permitted to be included without explicitly being listed in the article's text, as is already de facto permitted in dozens of articles about UK and Australian elections, Support?Oppose? why/why not? – GlowstoneUnknown(Talk)12:09, 4 August 2024 (UTC)
It's an MOS:INFOBOXPURPOSE violation to include it. The inclusion predates the RfC that ended with an outcome for them not to be included, and just needs putting into practice. Number5720:46, 4 August 2024 (UTC)
I believe (but am not 100% sure) that the reason |link= is disabled is because any links should be in the |caption= for the image. Primefac (talk) 20:27, 25 August 2024 (UTC)
I don't think I've ever seen that function used. However, it also strikes me as something that would be a very bad idea to include, given the frequency with which it would need to be updated and the potential for arguments over what is the latest poll, for example, if two are published on the same day or the latest one is disputed. I think it would probably be best to delete this from the infobox given it appears to be used very infrequently, if at all. Number5700:57, 6 September 2024 (UTC)
Ideally would be nice to have parameters like valid_vote and spoiled_vote so we can calculate percentages and turnout automatically, while enforcing standard guidelines (e.g. including spoiled ballots in turnout, but not percentages). – Closed Limelike Curves (talk) 21:21, 29 September 2024 (UTC)
For two reasons: a) the article is under WP:1RR which could make it harder to enforce consensus and maintain the infobox if each user only gets 1 revert for the entire article on Election Night, and b) I was thinking about possibly adding the infobox to other subarticle(s). But if users disagree with this, I will yield. Prcc27 (talk) 05:53, 15 October 2024 (UTC)
If the article is under 1RR, the template would also be under 1RR IMO. I can't see this is a valid reason for creating a template. The infobox can also be transcluded to other articles from the main article, which is better than having it in template space (one of the reasons the vast majority of election results templates were deleted was because template space is more prone to vandalism due to its relative lack of watchers). Number5720:29, 15 October 2024 (UTC)
It seems reasonable to work out any technical issues in a temporary place, then move it to the article, when it would, correctly, come under 1RR. It might also be worth mentioning that 1RR doesn't, as far as I know, include self reverts. All the best: RichFarmbrough13:12, 17 October 2024 (UTC).
If it's just a matter of 1RR, there isn't a protection that can be added. If the templates does need to be protected to match the article, though, please let me know. Primefac (talk) 15:33, 17 October 2024 (UTC)
Thanks. I was referring to "(one of the reasons the vast majority of election results templates were deleted was because template space is more prone to vandalism due to its relative lack of watchers)". All the best: RichFarmbrough16:03, 17 October 2024 (UTC).
Elected
We have two headers, <Officeholder> before election and Elected <Officeholder>. Because there is only one field we are using the capitalised version. In August I put in a fix for mayors Mayor before election and Elected mayor. I don't want to try to capture all possible titles that should be lowercased, or the lesser number that shouldn't (though that might be doable). Nor do I want to add to complexity by having a separate field or flag. What I propose therefore is: <Officeholder> before election and <Officeholder> elected. All the best: RichFarmbrough13:19, 17 October 2024 (UTC).
IMO this would be better solved by rewording the second one as <Officeholder> after election, primarily because this infobox is also used for elections in which the officeholder in question is not elected (e.g. many parliamentary elections, where a Prime Minister or Speaker is the officeholder listed). Number5700:51, 18 October 2024 (UTC)
I considered something similar to this, however in the US Presidential elections (and probably a significant number of others) the president elect (an alternative but slightly obscure term) is not the president in fact until some time later.
Prime ministers are indeed often (usually?) appointed, at least technically, by the head of state. But unless there is an election "after election" makes no sense. All the best: RichFarmbrough10:06, 18 October 2024 (UTC).
I'm not sure what about what I proposed would make no sense. What I would expect to see (and what we have) in the bottom right of the infobox for the 2024 United Kingdom general election is "Prime Minister after election: Keir Starmer". Are you suggesting this is nonsensical? Number5719:41, 18 October 2024 (UTC)
It looks good, and although there are some niceties[1] it's probably fine for the UK.
Let us suppose, though, that Bart Simpson wins the US presidential election in November. We would then have "President after election: Bart Simpson" But Joe Biden would be the President of the United States after the election until some time in early January.
^The UK General elections are not between the party leaders, and in the case of a hung parliament may require several candidates in sequence to be invited to form a government by the monarch. The monarch invites the person most likely to command the confidence of the house to form a government. In 1974 this was Edward Heath, although Labour had more seats.
college_voted parameter needs fixing
Could someone please fix the U.S. college_voted infobox so that the infobox will not say “to be determined” in the “elected president” field? We want the article to have this field blank, but we need the college_voted field so that “projected electoral vote” will display on Election Night instead of “electoral vote”. We have already had two users that oppose the “to be determined” field, and I was reverted when updating the parameter solely because of this issue. Prcc27 (talk) 03:56, 27 October 2024 (UTC)
After playing around on my sandbox, I figured out how to replace the TBD footnote with an underscore (which is a huge improvement), but still have not figured out how to have the “elected president” field completely blank. I hope someone will be able to help me. Thanks. Prcc27 (talk) 04:26, 27 October 2024 (UTC)
Default white background for map for better legibility in dark mode
Would it be possible to add a white background to the map so dark mode users can better read text? For example, at 2024 United States presidential election if the text does not fit in the state (because the state is too small), then it ends up on the dark background and the black text is then pretty difficult to read. I imagine this is a problem for plenty of other elections as well. Slapping a white background behind the map would be a simple solution. Arcturus95 (talk) 20:00, 5 November 2024 (UTC)
Compare the presidential election example on desktop with mobile; in the latter, there is an extra cell in the Nominee row with a bottom border visible. This can be seen on, for example, every US presidential election article. Annoyedhumanoid (talk) 17:47, 9 November 2024 (UTC)
Edit request 25 November 2024
This edit request has been answered. Set the |answered= parameter to no to reactivate your request.
On 1987 Chicago mayoral election, 1989 Chicago mayoral special election, 1991 Chicago mayoral election, and 1995 Chicago mayoral election, the Republican candidates, which weren't included before due to getting less than 5% of the vote and coming in third, were added to the infobox with the argument that there is longer the same consensus support that there once was to always employing a 5% cutoff. This is what Wikipedia:Five percent rule says on the matter "Several RFCs have established that third-party candidates must poll over five percent to be included in an infobox. The only exception is if only one candidate polls over five percent, in which case the second-place finisher may be included if determined appropriate by local consensus. This does not strictly apply to parliamentary elections, where other criteria may be used to include candidates if deemed appropriate." It doesn't indicate that opinions have changed, but there seems to be a bit of ambiguity, as it's not a third party that received less than 5% and didn't come in second. Should it be included or not? 2601:249:9301:D570:CC73:8E4F:4E6B:AB1B (talk) 01:05, 28 November 2024 (UTC)
I agree, the fact that it's a major party getting less than 5% creates that ambiguity. Hence why I believed there was a good reason to believe that the usually-deployed 5% guideline was inapplicable here (it's more so for third-parties and nonpartisan races).
Rarely does a major-party nominee receive sub-5% in elections for which we create dedicated articles (most elections election infoboxes are elections with dedicated articles), thus explaining why this question has not yet been clearly addressed.
There were a number of reasons it seemed to me that on a case-by-case basis, the Chicago examples would be good articles to include the Republican nominee even though they received sub-5%.
The Republican Party was an official major party in the state of the Illinois at the time of the elections (as it has been since the 1850s).
I lean towards general inclusion, with room for exclusion if persuasive reasoning exists.
I think a general lower threshold (1%? .1%?) would be more appropriate, for completeness. The fortunes of third parties in American politics is an important public issue, for example.-- Beland (talk) 21:42, 29 November 2024 (UTC)
Yes, and my opinion is that "major" parties should not be given special treatment; if it's encyclopedic when they get less than 5% of the vote, then neutrality seems to demand it's encyclopedic when other parties do as well. -- Beland (talk) 07:38, 30 November 2024 (UTC)
@Beland the very word “major” denotes the inherent significance of these parties. America has a political culture where (for centuries) two-party systems have dominated. It’s not un-encyclopedic to account for that. SecretName101 (talk) 05:45, 14 December 2024 (UTC)
And everyone who supports third parties here feels like it's not neutral to decide that those are the only two that should be talked about. Third party agendas are often ignored in public debates, get little coverage during election season, their candidates often aren't invited to debates...to say that the votes they get despite all those obstacles won't even be reported in the most popular source of information, well that seems like nearly complete erasure. Which seems especially harsh if we're only talking about adding one additional line to a table as the only thing that documents the existence of a given movement in that election for posterity. It's a bit less of a big deal if there's a table elsewhere on the page with full results and the infobox gives a total for "Other parties" or "Other candidates". That would be a more neutral rule, and would cope better with a hard 5% cutoff.
Third parties do have an important impact. The Green presidential candidate in 2000 probably swung the election for the Republicans. The fact that there are independent US Senators who caucus with the Democrats has at times decided the balance of power in that body. Candidates have gotten elected to Congress from the Know Nothing and Whig parties, despite not being part of the two dominant parties. -- Beland (talk) 06:17, 14 December 2024 (UTC)
Yeah, that seems like that would be a major information gap, given the pivotal nature of the 2000 Nader vote totals, unless we want to handle it with an "other" line (given that all "other" votes in Florida mattered a lot). -- Beland (talk) 01:15, 20 December 2024 (UTC)
Nader was more consequential because of the closeness of the election. But I agree a numerical threshold is more neutral, and I'd be fine lowering it enough to include all of them. Otherwise, there should at least be an "Other" line in all these elections. -- Beland (talk) 22:00, 22 December 2024 (UTC)
@Beland: What anyone "feels like" is not really an encyclopedic concern.
And not being automatically included in an infobox is not the same as receiving no mention within an article. Not receiving automatic infobox inclusion is not erasure, they are still able to be mentioned in the body of the articles.
As for your grievances about the political system: WP:SOAP. That's simply not the conversation here.
As for your proposal of regularly denoting in infoboxes the totals of candidates not included in the infobox, there's possible merit to that and you can propose it if you have a more fleshed-out idea of what that could look like. It'd be a heavy undertaking for Wikipedians to actually implement that though, because it would mean manually looking through every American election article, seeing if there are non-included candidates, and applying whatever the consensus is to each of those articles. Gargantuan task, but one that could still be proposed and phased-in if agreed to. SecretName101 (talk) 06:15, 21 December 2024 (UTC)
Those grievances are not mine; I'm just trying to explain why some readers would feel certain treatments are not neutral, which is a core encyclopedic concern. All reasonable readers should feel that articles give a fair and accurate account of the facts.
Not sure what needs fleshing out...the compromise would be putting "Other parties" or "Other candidates" or "Other" in infoboxes, with full results in the article. I'd argue neutrality demands a strict numeric threshold. If people feel "major" parties are left out too often at 5%, then maybe a 1% threshold would be better. -- Beland (talk) 20:19, 21 December 2024 (UTC)
The Know-Nothings and Whigs would count as major parties at certain times, so I think it'd be sensible to include them in cases where they fall under 5%. There's certainly nothing special about the labels "Democrat" or "Republican"—I'd just argue that if a candidate happens to fall below 5% in one district, but their party regularly wins more than 5% of the vote nationally, it's reasonable to include them. – Closed Limelike Curves (talk) 16:55, 22 December 2024 (UTC)
This seems unfair to parties who in other elections got just as high a percentage of votes as the Republicans in those elections. -- Beland (talk) 01:40, 24 December 2024 (UTC)
I'm not sure what you mean here; are you saying that for 1860 the Constitutional Union Party should also be included? Because I'd agree with that.If you want the general principle I'm using, my suggestion is to show any candidates who win 5% of the vote, or are members of a party that won 5% of the vote nationwide. – Closed Limelike Curves (talk) 20:53, 2 January 2025 (UTC)
The "or won 5% of the vote nationwide" part is what is giving certain parties coverage which is disproportionately large compared to the number of votes they got in the race which is the topic of the article. That seems unfair to supporters of smaller parties, who often complain (rightly or wrongly) the press intentionally ignores them. -- Beland (talk) 00:51, 3 January 2025 (UTC)
Which a consensus could change. And would probably be a benefit to those pages to do so.
In 1948, Alabama was a different scenario. The Truman-led Democratic national ticket did not have ballot access in Alabama, with the state's Democratic party fusion nominating the Dixiecrat ticket. Similarly, 1892 it was also different because the state Democratic parties in Colorado and Idaho fusion nominated the People's ticket, while Kansas and Wyoming had no Democratic Party ballot access (Dems also had no North Dakota ballot access, but received an electoral vote nevertheless and therefore are already on the infobox) SecretName101 (talk) 06:40, 3 December 2024 (UTC)
I'm trying to figure out the best way to do this so I'm asking here: how do I use the leader field in elections? Unlike many parliamentary or presidential systems, the leader of a local political party within the context of UK council elections is usually decided after the election whereas in national elections it is decided before.
I'll give an example: for the 1981 Greater London Council election the article lists Andrew McIntosh as the leader of the Labour Party because he was the group leader before the election, but he was only leader until 24 hours after the election took place, when the Labour councillors elected a new group leader. So who do I list as the leader? DimensionalFusion (talk · she/her) 12:09, 5 March 2025 (UTC)
The documentation states that "The "leader" of each party is the person leading the party through that election, so in this case would be McIntosh. Using a post-election leader would be misleading IMO. Number5715:49, 5 March 2025 (UTC)
By-election example needs updating
The by-election example given in the documentation (Template:Infobox election#By-election) could do with some updating, because it is noticeably sloppy: there's unnecessary explanatory text shoved into the top (not following how the parameter is supposed to be used), there's a boundary map (not a results map) in the infobox; Galloway's image is in landscape, throwing off the balance; and it doesn't abide by the 5% rule, either. This isn't just me nitpicking: boundary maps in the infobox are common for UK by-election articles (and only UK by-election articles), stubbornly reappearing despite efforts to get rid of them (full disclosure: by me), and I can't help but wonder one appearing in this example is part of the reason why.
We should replace the parameter "ongoing" with better parameter. Election system is not the same in every countries. Also there can be unique results and aftermath the infobox needs to be updated on. So, I propose to replace "ongoing" with a new parameter named "status".
In status parameter, we can choose from several options – "ongoing", "completed", "cancelled", "annulled", "scheduled", "proposed" and "suspended". For example, if we put "cancelled" on the paramter then the date section will show the text "Cancelled" with the scheduled date with bracket (or we can omit the date as the election is cancelled).
We can also replace "date" with "start date" and "end date" as some election events are long and I think we should mention the complete date. For example, writing start and end date will show "START – END" in the date part of the infobox.
I believe adding these things are not so complex and will help readers to understand election topics more in Wikipedia. Mehedi Abedin02:24, 26 March 2025 (UTC)
Accessibility
Got to be a way of fixing the text sandwiching because of massive width. We have thousands of pages that are an accessibility nightmare at 800px. We should ensure infoboxes are sized correctly so they don't push text unnecessarily so those with visual problems can still read the lead prose text. Moxy🍁07:56, 17 April 2025 (UTC)
Please link to at least one page as an example. When I go to 1996 United States presidential election and shrink my window to 800px wide (are we really worried about 800px windows in 2025?), the sidebars disappear and I get "Presidential elections were held in" as the first line of prose. The column is narrow, but that is exactly what I would expect at 800px wide. I don't see any sandwiching, because there is nothing on the left. I don't see the word "width" at Wikipedia:Manual of Style/Accessibility; what exactly is inaccessible about a narrow column of prose? – Jonesey95 (talk) 14:33, 19 April 2025 (UTC)
The sandwiching of text can occur because an image or in this case the info box is too large it doesn't need to be in between two things. Narrow columns of text can hinder accessibility by making it difficult for individuals with reading or vision disabilities to track the text and follow the flow of information. We should also avoid using narrow columns of content because they will not respond well to scaling. MOS:RESOLMoxy🍁15:16, 19 April 2025 (UTC)
The screen shot to the right does not make sense to me. It appears that the app being used, or something in the user's preferences, has greatly enlarged the body text while keeping the infobox text, which is supposed to render at 88% of the body text size, extremely small. Wikipedia's normal text-sizing settings are not designed for that sort of modification; there is no way to please everyone, especially people who customize in this way. The screen shot also shows a portrait-mode view of an article, which is clearly not the way to look at an article using this sort of enlarged text; any infobox or lead image would cause the same sort of problem, not just this infobox. What happens when you use a more reasonable landscape mode for viewing the article? – Jonesey95 (talk) 17:20, 19 April 2025 (UTC)
All will see it a bit different (like all elements) for some it wont be too bad for others it will be even worst then what is being presented here. Looking for solutions that will help all. I suggest looking at all platforms mobile and non mobile views to see what others see. Moxy🍁17:25, 19 April 2025 (UTC)
Agreed, but the text size disparity does not make sense to me. I think the image sizes are a problem, however, and have tried to address them below. – Jonesey95 (talk) 17:59, 19 April 2025 (UTC)
If you want to fix this issue, you will need to limit the size of the maps allowed (or by removing the option to set map widths). The template currently sets its width to the largest of the maps inside it, which is apparently around 500px for about 20 templates. Another thousand set it to 400-499. The remainder of the 34k uses of this template are less than that, with a default of 300px.
If that is not an appropriate solution, there is largely nothing that can be done. Some pages just aren't going to look good when we have the variety of templates we have. The best one might be able to offer would be to adjust when this template goes to full width, but it is unlikely there would be consensus for a number so large as 800. Izno (talk) 15:42, 19 April 2025 (UTC)
I see we say "The lead image in an infobox should not impinge on the default size of the infobox. Therefore, it should be no wider than upright=1.35 (equivalent to 300px...." We could also remove the side text beside the images place it in a better location perhaps to reduce the width? Moxy🍁15:46, 19 April 2025 (UTC)
|upright=1.35 is equivalent to 300px only when the user is logged in and also has 220px set as their preferred thumbnail size. For those people who are logged out, a recent change to the default thumbnail size, to 250px, means that the equivalent of 300px is now |upright=1.2 - if |upright=1.35 continues to be used, the effective width will be 340px. See m:Tech/News/2025/16 (currently posted at Wikipedia:Village pump (technical)#Tech News: 2025-16 and some user talk pages). --Redrose64 🌹 (talk) 16:27, 19 April 2025 (UTC)
I don't think the map is the problem at 2025 Canadian federal election. That map was 400px wide, but the infobox (I just edited the template to limit the map size to 300px wide, per the guideline), at least logged out on my screen, is 485px wide (in the screen shot, you can see white space on either side of the map).
Moxy may be noticing a result of the recent default thumbnail size increase. The three images of candidates at the top of the infobox are about 125px wide, which corresponds to upright=0.5, the default setting at {{Infobox election/row}} when there are three images. I changed that setting to 0.4 for three images and 0.6 for two images, which should limit the three images (or two images, if there are only two) to 300px wide, per the guideline. That change is not working for me, so there may be something else going on. I think limiting the width of the three candidates' images is needed to help this infobox comply with WP:IMGSIZELEAD. Coding help is welcome. – Jonesey95 (talk) 17:59, 19 April 2025 (UTC)
Follow-up: I went down the wrong rabbit hole with this one. That article and others use {{CSS image crop}} with a fixed image width to show candidate images. The change in the upright setting won't affect them, as far as I can tell. That template uses fixed pixel sizes, which will determine the width of the infobox. With three 120px images side-by-side and some heading text to the left, it's easy to end up with an infobox width of 460 to 490px. If WP:IMGSIZELEAD is to be followed here, someone would have to (with consensus) adjust all of the photos in these infoboxes to use fixed pixel widths of 100px or less. At least that's my conclusion after spending too much time digging into this issue. – Jonesey95 (talk) 18:25, 19 April 2025 (UTC)
Smaller candidate image sizes when there are three or more candidates
I have made a change in the sandbox to display the candidate images at a smaller size when there are three or more candidates. You can see the results at Template:Infobox election/testcases. As an example, on my screen, this 1997 election infobox goes from 490px wide to 390px wide. I believe that this change complies with the spirit of WP:IMGSIZELEAD, which suggests limiting lead images to 300px wide. The combined width of the three images is limited to 330px at the most, and usually renders at less than 300px.
I expect that this change may be controversial, since it significantly shrinks the size of many candidate images. I have not moved the code to the main template. We should probably seek wider comment if we wish to make this change.
I support this change. Ideally I'd also like to see the documentation updated to state that the image sizes should match the default to avoid situations where people are using css cropping and forcing much larger sizes. In the longer-term, a better solution would be to adopt the infobox style used on other languages (like es and fr) where candidates/parties are listed vertically, rather than horizontally and vertically – this would ensure a fixed width regardless of the number of candidates, and also avoid the situation that arises when there are 5/7/8 candidates in an infobox, resulting in empty spaces. Number5719:19, 19 April 2025 (UTC)
As I have said before, all horizontal or all vertical format is better than a horizontal-vertical mix. I'd support such a change. —CX Zoom[he/him](let's talk • {C•X})14:23, 20 April 2025 (UTC)
Add parameter for first and final round
This edit request has been answered. Set the |answered= parameter to no to reactivate your request.
Could the template be edited to add a parameter for the first and final round, 2021 New York City Democratic mayoral primary has an example of how it is currently used, with 1data templates that are unnecessarily complicated and often not used on pages that they would be beneficial for. Yoblyblob (Talk) :) 21:13, 3 May 2025 (UTC)
Not done: it's not clear what changes you want to be made. Please mention the specific changes in a "change X to Y" format and provide a reliable source if appropriate. There is no concrete edit request here, so I am deactivating the request. Discussion needs to happen about whether and how to implement whatever suggestion is being made here. – Jonesey95 (talk) 01:43, 5 May 2025 (UTC)
Adding a column parameter to make it so a new parameter does not need to be manually implemented.
See "First round," "Final round," and "Runoff" parameters on:
Again, there is no concrete "change this code to that code" request here. Any editor is welcome to edit the /sandbox version of the template to experiment with new parameters and display options. – Jonesey95 (talk) 17:02, 5 May 2025 (UTC)
Poll parameter
Should the poll parameters be depracated? Specifically, should the pollX_date, pollX_nomineeX, pollX_candidateX, pollX_source, and pollX_partyX fields be removed or depracated – reason being that I have never seen these be used in an actual article and that a search for use [1] shows that it is only used in one (1) article, and doesn't even display correctly in that article. I also think displaying polling data in the infobox may not be MOS:INFOBOXPURPOSE, but that's just my opinion. DimensionalFusion (talk · she/her) 17:41, 6 June 2025 (UTC)
This edit request has been answered. Set the |answered= parameter to no to reactivate your request.
Description of suggested change: Removal of fields related to polling, as discussed above. Performed in sanbox with intended effect on Template:Infobox election/testcases#9 which is the only testcase to use the poll fields
Should we add a parameter for "first round" so that editors do not need to use the 1data and blank data templates? The options would be either adding just a first round parameter and leaving "Popular vote" to act as a final round, or we add both a first round and a final round parameter – whichever would make more sense. Pinging @Yoblyblob as you've raised this before DimensionalFusion (talk · she/her) 08:20, 5 June 2025 (UTC)
Showing the difference in votes between the first and final rounds is important imo. It should be a standard for the infobox. Wowzers122 (talk) 14:01, 5 June 2025 (UTC)