Talk:List of MPs for constituencies in Wales (2019–2024)

Sorting by party gives strange results

edit

When I sort the list by party, four Labour MPs are sorted between Independent and Plaid Cymru, while the rest are at the end of the list. It seems that this is happening because although the party displayed is "Labour", the underlying party is "Labour Co-operative" for the four and "Welsh Labour" for the others. Is there a way to fix this, perhaps by defining a specific field for sorting? STeamTraen (talk) 12:42, 28 April 2022 (UTC)Reply

@STeamTraen: Another issue on top of that "Conservative" appears out of alphabetical order, after "Plaid Cymru" – i.e., as "Welsh Conservatives". That there are two separate issues with the sorting makes me think that the answer isn't to fix individual instances of {{Party name with colour}}, but rather to change the template itself so that it always sorts by the visible text. I'll raise this at Template talk:Party name with color. Ham II (talk) 14:59, 2 May 2022 (UTC)Reply