VoteNY extension is currently structured mostly with '''<div>''' elements, and some of the custom attributes are being stated incorrectly. This is what it currently looks like, which is quite messy and needs to be refactored.
== Current state ==
```lang=html
<div id="ajaxpoll-container-POLLID">
<script>var useAjax=true;</script>
<div id="ajaxpoll-id-POLLID" class="ajaxpoll">
<!-- If vote has been revoked -->
<div id="ajaxpoll-POLLID" class="ajaxpoll-ajax" style="display: inline-block;"> Your vote has been revoked </div>
<!-- If vote has been added -->
<div id="ajaxpoll-POLLID" class="ajaxpoll-ajax" style="display: inline-block;"> Your vote has been added </div>
<!-- If vote hasn't been chosen yet -->
<div id="ajaxpoll-POLLID" class="ajaxpoll-ajax" style="display: none;"></div>
</div>
<div class="ajaxpoll-question">{{{QUESTION}}}</div>
<div class="ajaxpoll-misc">
"You voted for "{{{ANSWER}}}" on DD MONTHNAME at hh:mm. You can change your vote by clicking a different answer below."
</div>
<form method="post" action="" id="ajaxpoll-answer-id-POLLID">
<input type="hidden name="ajaxpoll-post-id" value="POLLID">
</form>
<div id="ajaxpoll-answer-POLLID-NUM" class="ajaxpoll-answer" poll="POLLID" answer="NUM">
<div class="ajaxpoll-answer-name ajaxpoll-answer-name-revoke">
<label for="ajaxpoll-post-answer-POLLID-NUM" class>
<input type="radio" id="ajaxpoll-post-answer-POLLID-NUM" name="ajaxpoll-post-answer-POllID" value="1">
</label>
{{{ANSWER}}}
</div>
<div class="ajaxpoll-answer-vote ajaxpoll-our-vote">
<span title="PERCENT% of all votes">NUMBEROFVOTES</span>
<div style="width:PERCENT%;"></div>
</div>
</div>
<!-- repeat answer element etc etc since poll has multiple choices-->
<div class="printfooter">
Retrieved from "<a dir="ltr" href="SITE/index.php?title=PAGENAMEamp;oldid=OLDID">http://SITE/index.php?title=PAGENAME&oldid=OLDID</a>"
</div>
</div>
```
== Suggestion ==
* Custom attributes should start with the `data` prefix:
** `answer` attribute should look like `data-pollNY-answers`
** `poll` attribute should look like `data-pollNY-pollID`
* The `input type="radio"` should not be inside a `label` element. The name and input can't be correctly associated with assistive technology devices, and it's discouraged by the W3C and sites compliant with WCAG by the same reason.
* Too many divs! Semantic elements exist for a reason. :D
** Poll title: `h1` instead of `div`
** Poll container: `form` instead of `div`
** Poll footer: `footer` instead of `div`
** etc etc
* Class and IDs should have the prefix `pollNY` instead of `ajaxpoll` because that's simply the name of the extension; it makes more sense.
```lang="html"
<form id="pollNY-pollID" class="pollNY-form" data-pollNY-pollID="pollID">
<header class="pollNY-header">
<h1 class="pollNY-question">{{{QUESTION}}</h1>
<p class="pollNY-vote-state" id="pollNY-vote-state-revoked" data-pollNY-vote-state="revoked">Your vote has been revoked.</p>
<p class="pollNY-vote-state" id="pollNY-vote-state-added" data-pollNY-vote-state="added">Your vote has been added.</p>
<p class="pollNY-vote-date">You voted on MONTH DAY, YEAR at hh:mm. You can change your answer by clicking a different choice below.</p>
</header>
<ul class="pollNY-choices">
<li id="pollNY-choice-1" class="pollNY-choice" data-pollNY-choice="1">
<input type="radio">
<label>CHOICE 1</label>
</li>
<li id="pollNY-choice-2" class="pollNY-choice" data-pollNY-choice="2">
<input type="radio">
<label>CHOICE 2</label>
</li>
</ul>
<footer class="pollNY-printfooter">
<p>Retrieved from <a href=""></a></p>
</footer>
</form>
```
== Other comments ==
Not sure what to do with the `input hidden` stuff so I left it out. Also I might've just forgotten some other stuff so please tell me if you find something. Also feel free to give feedback and suggestions, thanks :)