poll

A  poll  is a post type that facilitates responses to be aggregated into a final set of votes, usually offering between two and four options from which users can choose. Polls are commonly used on social networks such as Twitter, Instagram, and Mastodon.

Why
You may want to publish a poll on your personal website to get answers to a question on your mind from your readers. This could cover anything from questions about your blog to quiz questions (which could be part of a challenge) to a question you have about something on your mind.

How
There is no single way of publishing a poll that is accepted and recognized by the IndieWeb community. So far, we have agreed a poll should be started in a h-entry and accept votes through Webmentions. The community is still discussing the most effective way to run a poll.

capjamesg's Approach
phrased a question in a blog post then allowed readers to vote on an answer by using a Webmention. He did not use any special markup to make it as easy as possible to test asking a question that supported answers from readers. More information is provided in the "IndieWeb Examples" section below.

capjamesg
started a poll on his blog on May 17, 2022. The poll asked how much coffee his readers drank. To vote, readers must submit a Webmention to the URL with the option for which they want to vote. James plans to aggregate the results manually and share them on his blog while considering different ways to automate the process.


 * The poll: https://jamesg.blog/2022/05/17/coffee-frequency/

Granary
Not yet; feature request.

Bridgy Fed
Not yet; feature request.

Bridgy
Not yet.

Twitter
To create a Twitter poll, a user starts a new tweet, selects the poll button, and is presented with a view that asks for a question, two responses (with the ability to add up to two more), and a duration.



After a poll is created, the owner sees a results view:



Followers see a choices view:



When presented with a poll, followers can 1) select a poll choice and/or 2) add commentary with a reply. After selecting a choice, the current results of the poll are shown.



Instagram
On Instagram, polls are added to Stories as a sticker. As a result, they are only 24 hours in duration. Instagram polls have a question and two to four answers. Followers can tap a choice to respond as well as send an additional reply as a DM.



Mastodon
Mastodon can create special posts for polls. The JSON in ActivityPub uses the activity type "Question", using "oneOf" (radio buttons) and "anyOf" (checkboxes) to list possible responses. This is described in the Activity Vocabulary spec: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-question.

Some ActivityPub services may not handle polls. If a server does not understand the activity "Question", it may only display the text of the post, confusing users. Micro.blog is considering displaying the poll choices but without allowing a way to actually submit answers.

Design details:
 * Mastodon does show a notification on timed polls: "a poll you voted in has finished", with results

Plain text design / equivalent — what Mastodon does for a link-preview of a poll:
 * e.g. https://mstdn.social/@feditips/110407908649128257 produces the following plain-ish text equivalent preview in Slack: "Mastodon 🐘 Fedi.Tips (@feditips@mstdn.social) How do you access the Fediverse? :fediverse: If you use more than one method, choose the one you use the most. [ ] Mastodon server website [ ] Official Mastodon app [ ] Third party Mastodon app [ ] Non-Mastodon server Yesterday at 10:43" (and yes the ":fediverse:" literally showed up like that in Slack)

Brainstorming

 * How should one ensure that the same domain does not send multiple Webmentions to try and manipulate the outcome of a question (assuming Webmentions are used for the polling logic)?
 * Ways to accept responses to a poll
 * Look for #1 #2 #3, etc. strings of text in a Webmention sent to your post. Any "hashtag" followed by a number would be considered a vote for the question. If multiple hashtags are provided, logic would need to be in place to choose which one is the "authoritative" vote (or the vote could be ignored entirely).
 * Ask participants to send Webmentions to different URLs. A new URL would correspond to an answer to a poll. This may be confusing for participants though.
 * Ask participants to send Webmentions to a fragment on a page (i.e. example.com/poll#1). This would allow a Webmention receiver to receive all poll responses on the same page, which would make aggregation easier for poll publishers than having separate URLs for each method.
 * Webmention marked up with a new property (but this involves creating markup when another solution can be used without markup).