Page MenuHomePhabricator

HTML <ul> embedded directly inside another <ul> in voting result page
Closed, ResolvedPublicBUG REPORT

Assigned To
Authored By
1F616EMO
Oct 11 2025, 1:18 AM
Referenced Files
F70289064: 圖片.png
Nov 19 2025, 1:41 PM
F70289054: 圖片.png
Nov 19 2025, 1:40 PM
F70229079: 2025-11-15_095712.png
Nov 15 2025, 5:58 PM
F70229076: 2025-11-15_095652.png
Nov 15 2025, 5:58 PM
F70219852: image.png
Nov 14 2025, 11:19 PM
F70219876: image.png
Nov 14 2025, 11:19 PM
F66742064: 圖片.png
Oct 11 2025, 1:18 AM
F66742061: 圖片.png
Oct 11 2025, 1:18 AM

Description

Steps to replicate the issue (include links if applicable):

  • Vote in a SecurePoll histogram range poll, e.g. Oct 2025 AELECT of zhwiki.
  • On the top choices (RfA), pick at least one -1/+1 (oppose/support) and leave some as 0 (neutral).
  • Submit your vote.

What happens?:

  • Inspect its source code, and you will see an ul.securepoll-vote-result-no-vote embedded directly inside ul.securepoll-vote-result-options as its direct descendant.

What should have happened instead?:

  • ul.securepoll-vote-result-no-vote list should be outside and sit alongside ul.securepoll-vote-result-options. Per T22023, it is intended to separate the two lists.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia): zhwiki

Other information (browser name/version, screenshots, etc.):

  • It is also found that the username of Hamish, the RfIA candidate, may disappear if a vote is cast on their RfIA. It seems unrelated, but is noted here to avoid confusion.
  • (Done with test data) test votes on both RfA and RfIA. Note that the bullet point of RfIA is missing - that is caused by the combination of CSS hacks and this bug.
    圖片.png (698×473 px, 221 KB)
  • (Done with test data) Test votes with only one 0 on the RfA side. It has the same problem as the RfIA bullet point.
    圖片.png (459×504 px, 95 KB)

Event Timeline

Restricted Application added subscribers: Stang, Aklapper. · View Herald Transcript

Change #1195353 had a related patch set uploaded (by 1F616EMO; author: 1F616EMO):

[mediawiki/extensions/SecurePoll@master] VotePage: Corrected HTML syntax of the list of not voted items

https://gerrit.wikimedia.org/r/1195353

Any updates on whether this patch can be merged?

Sorry for the delay. SecurePoll had a code freeze during the BoT election, but that's over now, so should be able to review this.

The visual output pre- and post- patch appears to be different. Is this intentional? Or do we need to add a CSS indent to your patch for the "not checked" candidates?

Pre patch

image.png (888×646 px, 162 KB)

Post patch

image.png (1,013×884 px, 103 KB)

May you try again with two voted and two not-voted items? Visual changes are expected (the old code contains glitches that prevent proper display), and your screenshots seems right for only one not-voted, but checks has to be done on more than one not-voted items too.

Sure. Here's the multiple non-votes case:

Before

2025-11-15_095652.png (1,141×1,164 px, 96 KB)

After

2025-11-15_095712.png (1,153×1,123 px, 96 KB)

That’s weird. I may try to set up a local testing environment or mess with Patch Demo and inspect the code in a day or two.

Updated the code and it works as expected on REL1_44. (I tested with Citizen skin, but there should be no difference.)

  • One voted and two not voted:
    圖片.png (482×677 px, 86 KB)
  • Two voted and one not voted:
    圖片.png (477×684 px, 84 KB)

The second image (F70289064) does not appear attached to the task. Can you attach it so others can see it?

The second image (F70289064) does not appear attached to the task. Can you attach it so others can see it?

Done. Also gotta add some caption.

If all we have to do is to solve the HTML validity problem, this task can be closed after merging that patch. However, observing a lack of indication between the voted and not-voted list, I wonder if completely separating the two lists is the correct way to go. That is, whether that empty line in the description of T22023 should be taken literally.

It seems completely fine to put them inside a single list (but always but not-voted items at the end), though I do not intent to implement this in this bug-fixing patch, as having two lists best aligns with the description of T22023. I may open another task if needed.

1F616EMO changed the task status from Open to In Progress.Mar 7 2026, 11:42 AM
1F616EMO triaged this task as Low priority.

@Novem_Linguae Bump for re-review.

Busy for a couple weeks. Will try to get to this at the end of the month. Feel free to ping again around then if needed.

Change #1195353 merged by jenkins-bot:

[mediawiki/extensions/SecurePoll@master] VotePage: Corrected HTML syntax of the list of not voted items

https://gerrit.wikimedia.org/r/1195353

The vote summary page still looks pretty weird. Some lines have bullets and some don't. I've filed a follow up ticket for that: T425765: for histogram range polls, vote summary page is sometimes missing bullets