Page MenuHomePhabricator

On the vote page, for ineligible voters, remove bullet from in front of "unqualified-error"
Closed, ResolvedPublicFeature

Description

What

image.png (1,371×323 px, 48 KB)

  • In the above screenshot, the first two bullets are reasons this user cannot vote.
  • The third bullet is the "unqualified-error" SecurePoll msg for that election.
  • Show "unqualified-error", but don't put a bullet in front of it.

Why

  • Only reasons this person can't vote should be in the bulleted list. A generic statement that they can't vote and where to appeal it is not part of this list and shouldn't have a bullet.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

The content of these bullets is collected in a status object in Election->getQualifiedStatus() via $status->error() and $status->fatal() calls, bubbles up the stack 3 or 4 levels, then is converted to a wiki bulleted list in VotePage->execute() in $out->addWikiTextAsInterface( $status->getWikiText() );

In addition to (preferably) or instead of removing the bullet, adding "due to the reason(s) above" to the end of the first sentence on the last line would also make it clear that that line is not a reason why they cannot vote. Seeing a list of three items when there are only two reasons why you cannot vote is confusing.

In addition to (preferably) or instead of removing the bullet, adding "due to the reason(s) above" to the end of the first sentence on the last line would also make it clear that that line is not a reason why they cannot vote. Seeing a list of three items when there are only two reasons why you cannot vote is confusing.

Support this update, though I think it can be made in the local config for now, since that is meant to be customizable per election/circumstance anyways.

Change #1268074 had a related patch set uploaded (by HakanIST; author: HakanIST):

[mediawiki/extensions/SecurePoll@master] VotePage: Display unqualified-error outside bulleted list

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

I submitted a patch for this: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/SecurePoll/+/1268074

The approach: Instead of adding the custom unqualified-error message to the Status object (which causes it to be rendered as a bullet via getWikiText()), the message is now displayed separately by the caller (VotePage and LoginPage) as plain text below the bulleted list of specific qualification failure reasons.

The existing test in ElectionTest.php was updated accordingly.

Novem_Linguae assigned this task to HakanIST.

Change #1268074 merged by jenkins-bot:

[mediawiki/extensions/SecurePoll@master] VotePage: Display unqualified-error outside bulleted list

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