Template talk:Infobox election
| Template:Infobox election is permanently protected from editing as it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
| This is the talk page for discussing improvements to the Infobox election template. |
|
| Archives: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10Auto-archiving period: 3 months |
| This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||
| |||||||||||||||
Last election – what to list first? Votes or seats
editRegarding the last election parameter, when articles include both the vote percentage and the seats won, it is being done different ways in different article sets; some put % of vote first (e.g. 38.1%, 16 seats), some put seats first (e.g. 16 seats, 38.1%). It would be good to have a definitive approach to this.
It's always struck me as best to have the % first, both because that's how the results table shows it, but arguably more importantly because it's clearer that the % is the vote share and not the percentage of seats, which could be assumed when writing "16 seats, 38.1%". Cheers, Number 57 18:36, 2 August 2025 (UTC)
- I prefer "XX.X%, YY seats" because seats are ultimately derived from votes, not the other way around. I would be wary of establishing an absolute rule, but this seems to be the most common approach. Gust Justice (talk) 18:46, 2 August 2025 (UTC)
- Note that, as of currently, parties are ordered in the infobox by number of seats, not by vote %. Changing the order in which this is shown would also mean that this would be counter-intuitive, and probably have implications re current consensus on infoboxes (i.e. people using the change to justify that the order of parties should be done by vote share instead, which will be a headache particularly for FPTP systems).
- Further, I don't recall any major (or even minor) incident arising because of people mistaking the % share with the percentage of seats, particularly when just below the % and swing shown clearly relate to vote share. I, for myself, think that changing this across so many articles (which have used this format for decades) would be a nuisance to very little (if any) gain. Not having a strong feeling either way, but I am wary of the possible fallout of such change. Impru20talk 10:38, 3 August 2025 (UTC)
- Parties are ordered by seats won in the current election, not seats won in the previous election, so I'm not sure why this is relevant? On the second point I quite regularly see people filling in the percentage field with the percentage of seats (e.g. here), and there are several articles that still have this error (e.g. April 1872 Spanish general election or August 1872 Spanish general election). Number 57 14:13, 3 August 2025 (UTC)
- If for the current election you are going to put seats first, then it makes sense that the same order is preserved for the previous election. But if you change the order of the fields, then that's where you are going to have some serious issues.
- Hmm but the examples you cite are a different situation, aren't they? Aside of being few (cannot see how that is "quite regularly"), these do not involve the "Last election" field at all (these pages do not even use it!) but the "Percentage" one, and indeed, relate to situations where a vote share is not available at all. That is not what you have brought up in this discussion, right? Impru20talk 14:30, 3 August 2025 (UTC)
- I was just attempting to demonstrate that there is confusion amongst some people as to what 'percentage' in the infobox refers to, hence why I think it would be better to have the % stated before seats to reduce the potential for people thinking it's the % of seats. Number 57 18:19, 3 August 2025 (UTC)
- I don't see people adding the seat % to the "Percentage" field when there is no vote share % to begin with is a "confusion", but rather a fully intentional move: in those cases it is either the seat % or no % at all. We can discuss the merits of whether that field should be used or not in such cases, but that is a vastly different situation to the one that was brought to discussion here, which pertains the "Last election" field (which is left unused in the examples you cited) and involves both seats and vote share % (not the seat %). Impru20talk 18:26, 3 August 2025 (UTC)
- I was just attempting to demonstrate that there is confusion amongst some people as to what 'percentage' in the infobox refers to, hence why I think it would be better to have the % stated before seats to reduce the potential for people thinking it's the % of seats. Number 57 18:19, 3 August 2025 (UTC)
- Parties are ordered by seats won in the current election, not seats won in the previous election, so I'm not sure why this is relevant? On the second point I quite regularly see people filling in the percentage field with the percentage of seats (e.g. here), and there are several articles that still have this error (e.g. April 1872 Spanish general election or August 1872 Spanish general election). Number 57 14:13, 3 August 2025 (UTC)
Make first round field not dependent on primary
editCurrently the code in Module:Infobox election only shows a "First round" field if the election type is set to primary. Should this check be removed? DimensionalFusion (talk · she/her) 15:49, 2 September 2025 (UTC)
Adding a second map image for general elections
editWould make it MUCH easier to insert maps for both presidential and parliamentary results. ⛿ WeaponizingArchitecture | yell at me 00:53, 5 September 2025 (UTC)
- This infobox is often too bloated as it is. Should we be encouraging that by implying we want more maps? We need to stop stuffing everything into the infobox, follow MOS:INFOBOXPURPOSE and remember we’ve got a whole article where we can display things. Bondegezou (talk) 06:12, 5 September 2025 (UTC)
Edit request 29 October 2025
editThis edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
Description of suggested change: Change the "first round" and "swing" fields such that, if inputted, the fields will show regardless of the type of election. Swings can exist in all election types except for primary (presidential, legislative, parliamentary, by-election), and this would have the effect that infoboxes with the presidential and by-election types would now be visible. The "first round" parameter would also be visible in all types, so it would now be visible outside of types set to "primary", same as the final round parameter.
Diff:
As performed on sandbox
DimensionalFusion (talk · she/her) 13:56, 29 October 2025 (UTC)
- I'm not sure the change is necessary for swing; it is already able to be used for by-election articles (e.g. 2025 Caerphilly by-election). Swing is also not generally reported for presidential elections and I think the risk of allowing it to be shown means it will be, when it's probably not appropriate. Number 57 15:56, 29 October 2025 (UTC)
- @Number 57 Swing is indeed shown in by-election articles, but not when by-election type is specified in the infobox. In 2025 Caerphilly by-election, the infobox type is parliamentary, not what it "should" be, which is by-election DimensionalFusion (talk · she/her) 10:00, 30 October 2025 (UTC)
- Not done. Please reactivate the request if and when consensus is reached. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:15, 8 December 2025 (UTC)
- I see this has been reactivated. Rather than change it so it always appears, why not just change it so it appears for by-elections (as well as parliamentary ones). Number 57 15:08, 20 December 2025 (UTC)
Edit Request 12 November 2025
editDescription of Suggested Change: Add additional fields to the very bottom of the infobox for outgoing government/cabinet and parties and incoming government/cabinet and parties, and additionally make it optional to have an outgoing field but not an incoming one and vice versa for some of these fields. The issue this is trying to resolve is that the infobox currently allows you to compare the prime minister or the party/coalition/cabinet in power before and after an election, but not each of these things. A change would allow the infobox to adequately represent an incoming or outgoing Prime Minister (or similar), their party, and the government/cabinet/coalition they led. For instance, the 1948 Irish general election infobox currently lists the incoming Taoiseach as:
- Taoiseach after election
- John A. Costello
- Fine Gael
However in that election Fine Gael came to power with several other parties in the First Inter-Party Government, and they replaced a single-party majority government. In that case, the infobox should be better explaining the outcome of the election in terms of government formation. I think it would be best add 6 fields:
- outgoing government title
- incoming government title (these to be in bold similar to the title and posttitle fields)
- outgoing government
- incoming government
- outgoing government parties
- incoming government parties.
The reason for proposing all three fields is that this would give maximum flexibility for different political systems from different countries where various types of information are considered important. An example of the existing constraint is that the Netherlands elections list only the cabinet and parties involved, but mention nothing about the prime minister. I think it should be possible to do both. Grollum (talk) 13:53, 12 November 2025 (UTC)
Add role="presentation" on a layout table
editThis edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
More specifically, edit the
{{{!}} cellspacing="0" cellpadding="0" style="background:transparent; color: inherit; width:100%;"
line so that it becomes
{{{!}} role="presentation" cellspacing="0" cellpadding="0" style="background:transparent; color: inherit; width:100%;"
sapphaline (talk) 19:43, 9 December 2025 (UTC)
- As I have requested before, please do not paste code blobs into the talk page; we have the sandbox and testcases pages for a very good reason. That aside, why does the sandbox have more changes than those mentioned here? --Redrose64 🌹 (talk) 20:55, 10 December 2025 (UTC)
- Because I tested them and they appeared to break the template in some use cases, hence I don't want the live template to match the current sandbox version. sapphaline (talk) 12:25, 11 December 2025 (UTC)
- Then we can't test it properly. Please make sure the sandbox contains exactly the desired future version, no more and no less. --Redrose64 🌹 (talk) 23:44, 11 December 2025 (UTC)
- Because I tested them and they appeared to break the template in some use cases, hence I don't want the live template to match the current sandbox version. sapphaline (talk) 12:25, 11 December 2025 (UTC)