Jump to content

Template talk:Infobox election

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

Edit request 24 August 2024

[edit]

Description of suggested change: Add link argument to custom flag images

Diff:

{{#invoke:InfoboxImage|InfoboxImage|image={{{flag_image|}}}|size=50px|alt=|link=}}<hr />
+
{{#invoke:InfoboxImage|InfoboxImage|image={{{flag_image|}}}|size=50px|alt=|link={{{flag_link}}}}}<hr />

DimensionalFusion (talk) 13:40, 24 August 2024 (UTC)[reply]

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)[reply]
If this is true, then when flag_image is used it shouldn't link to the flag file when clicked. Maybe I'll look into that too DimensionalFusion (talk) 18:47, 26 August 2024 (UTC)[reply]
@DimensionalFusion I think the idea is that since the flag is a purely decorative image, adding a link to the flag file would cause screen readers to unnecessarily read out the file name. --Ahecht (TALK
PAGE
)
21:26, 16 September 2024 (UTC)[reply]
 Not done for now: please establish a consensus for this alteration before using the {{Edit template-protected}} template. --Ahecht (TALK
PAGE
)
14:45, 27 September 2024 (UTC)[reply]

How to use the poll1 parameter?

[edit]

I was trying to add polls to the Next United Kingdom general election box and cannot work out how to do so, so I had to use the blank parameter instead. Are there any examples of the poll fields in use, so I can find what I'm missing about how to do it? Chessrat (talk, contributions) 21:58, 5 September 2024 (UTC)[reply]

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. Number 57 00:57, 6 September 2024 (UTC)[reply]
I second this. Vacant0 (talkcontribs) 16:53, 6 September 2024 (UTC)[reply]
Support deleting this parameter as well. – Closed Limelike Curves (talk) 21:09, 29 September 2024 (UTC)[reply]

Question

[edit]

How am I able to display an alternative name for a party in the Infobox? I want to link the Reform Party (Northern Mariana Islands) without displaying it as the full name. Rather, I want to link it as Reform. I've always struggled with the parameter and I've never fully figured out what to do to resolve this. Ornithoptera (talk) 05:58, 19 September 2024 (UTC)[reply]

I've added the party to Module:Political party/R. It should now display as you've wished. Vacant0 (talkcontribs) 09:43, 19 September 2024 (UTC)[reply]

Adverse interactions with dark mode and Template:Composition bar compact

[edit]

This template seems to break compact composition bars in dark mode. Allan Nonymous (talk) 13:50, 19 September 2024 (UTC)[reply]

Valid vote parameter

[edit]

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)[reply]

Help with template

[edit]

Hello. I created a new election template (Template:2024 United States presidential election infobox). Can anyone help me add the view, talk, and edit perimeter on the infobox? Prcc27 (talk) 22:21, 14 October 2024 (UTC)[reply]

Why would you want this as a template? Infoboxes should be coded directly onto the article they appear on. Number 57 00:02, 15 October 2024 (UTC)[reply]
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)[reply]
See {{2024 United States presidential election infobox/sandbox}} and the testcases page. – Jonesey95 (talk) 20:23, 15 October 2024 (UTC)[reply]
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). Number 57 20:29, 15 October 2024 (UTC)[reply]
1 revert for the article and 1 revert for the infobox is better than 1 revert for both only. Prcc27 (talk) 23:28, 15 October 2024 (UTC)[reply]
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: Rich Farmbrough 13:12, 17 October 2024 (UTC).[reply]
I wonder why the templates' protection status wasn't just elevated. All the best: Rich Farmbrough 13:13, 17 October 2024 (UTC).[reply]
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)[reply]
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: Rich Farmbrough 16:03, 17 October 2024 (UTC).[reply]

Elected

[edit]

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: Rich Farmbrough 13:19, 17 October 2024 (UTC).[reply]

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). Number 57 00:51, 18 October 2024 (UTC)[reply]
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: Rich Farmbrough 10:06, 18 October 2024 (UTC).[reply]
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? Number 57 19:41, 18 October 2024 (UTC)[reply]
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.
All the best: Rich Farmbrough 22:24, 18 October 2024 (UTC).[reply]

References

  1. ^ 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

[edit]

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)[reply]

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)[reply]

Default white background for map for better legibility in dark mode

[edit]

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)[reply]

Looks like switching to an SVG in this edit for my example article effectively did what I was asking. But regardless, the default should always be white. Arcturus95 (talk) 02:58, 6 November 2024 (UTC)[reply]

Extra cell in nominees row on mobile

[edit]

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)[reply]

Edit request 25 November 2024

[edit]

A null edit is needed to remove this from Category:Templates with missing files. Sumanuil. (talk to me) 07:16, 25 November 2024 (UTC)[reply]

 Done * Pppery * it has begun... 17:05, 25 November 2024 (UTC)[reply]

Major parties coming in third with less than 5%

[edit]

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)[reply]

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.
SecretName101 (talk) 01:23, 28 November 2024 (UTC)[reply]
For what it's worth the individual state pages for the 1860 United States presidential election and 1912 United States presidential election don't list the Republican candidate in the infoboxes if they got less than 5% of the vote. 2601:249:9301:D570:CC73:8E4F:4E6B:AB1B (talk) 03:54, 28 November 2024 (UTC)[reply]
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)[reply]
@Beland this particular discussion is about the handling of major parties when their candidates receive sub-5% vote shares. Not third parties SecretName101 (talk) 07:34, 30 November 2024 (UTC)[reply]
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)[reply]
@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)[reply]
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)[reply]
The Whig Party was a major party at one point. As for Ralph Nader in 2000, he received less than 5% of the vote, so he wouldn’t qualify for the infobox. 66.99.15.163 (talk) 21:09, 19 December 2024 (UTC)[reply]
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)[reply]
In term of percentage of vote, Nader in 2000 got less than other people not on the infobox like John P. Hale in 1852, Eugene V. Debs in 1904, 1908, and 1920, James B. Weaver in 1880, Gary Johnson in 2016, and Allan L. Benson in 1916, so I don't see much of an argument for including him over them. 2601:249:9301:D570:1C36:B316:2ADD:408D (talk) 04:27, 22 December 2024 (UTC)[reply]
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)[reply]
"Consequential" is more of a subjective determination. 2601:249:9301:D570:94BF:1137:AC8:B3A6 (talk) 17:12, 23 December 2024 (UTC)[reply]
Sure, which is why I advocate a numeric threshold. -- Beland (talk) 00:32, 24 December 2024 (UTC)[reply]
There is already a numeric threshold, which Nader's performance falls below. 98.228.137.44 (talk) 17:22, 25 December 2024 (UTC)[reply]
That's fine, if it's applied equally to Republicans, Democrats, Whigs, and Know-Nothings. -- Beland (talk) 21:38, 25 December 2024 (UTC)[reply]
@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)[reply]
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)[reply]
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)[reply]
As pointed out below, would that mean the the Republican candidates who came in third place on articles like 1948 United States presidential election in Mississippi, 1948 United States presidential election in South Carolina, 1912 United States presidential election in Louisiana, 1912 United States presidential election in Georgia, 1912 United States presidential election in Mississippi (where he came in fourth place behind Eugene Debs, who also didn't qualify for the infobox), 1912 United States presidential election in South Carolina, 1912 United States presidential election in California (where he came in fifth place due to only getting write-in votes), 1892 United States presidential election in Mississippi, and 1892 United States presidential election in Alabama should also be included? There are also cases in 1856 and 1860, such as 1860 United States presidential election in Kentucky, 1860 United States presidential election in Virginia, 1860 United States presidential election in Maryland, 1856 United States presidential election in Maryland, and 1856 United States presidential election in Delaware for Republicans, plus in the latter election, where the Democratic party split, leading to examples like 1860 United States presidential election in Florida, 1860 United States presidential election in North Carolina and 1860 United States presidential election in Mississippi where Douglas, who is considered the official nominee, got less than 5%. 2601:249:9301:D570:94BF:1137:AC8:B3A6 (talk) 17:23, 23 December 2024 (UTC)[reply]
Sounds good to me. – Closed Limelike Curves (talk) 00:44, 24 December 2024 (UTC)[reply]
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)[reply]
Which a consensus could change. And would probably be a benefit to those pages to do so.
the question would be whether to consider the 1912 Progressive party a major party in that specific election or not. SecretName101 (talk) 07:37, 30 November 2024 (UTC)[reply]
A few statewide results in the 1892 United States presidential election and 1948 United States presidential election are in a similar situation. 98.228.137.44 (talk) 23:37, 1 December 2024 (UTC)[reply]
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)[reply]
(Same poster as before, IP address changed based on location) I was referring to cases like 1948 United States presidential election in Mississippi and 1892 United States presidential election in Alabama where the Republican candidate was on the ballot, but got less than 5% of the vote and came in third place, so they aren’t included in the infobox, which is more similar to the issue being discussed above. 66.99.15.163 (talk) 14:50, 4 December 2024 (UTC)[reply]
I'd say so, since they polled over 5% of the vote nationally. – Closed Limelike Curves (talk) 16:56, 22 December 2024 (UTC)[reply]
5% is meant to be a rule of thumb; I think these should be included. – Closed Limelike Curves (talk) 00:43, 5 December 2024 (UTC)[reply]
Should the other brought up examples also include them? 66.99.15.163 (talk) 19:39, 9 December 2024 (UTC)[reply]