Accessibility: Make vote arrows into buttons.

This adds three attributes to vote arrows:

* role="button" is part of ARIA and tells user agents that even though
  the vote arrow is a div, it's actually meant to be a button.
* aria-label, another part of ARIA, this tells user agents what to
  call the newly buttonized.
* tabindex, this makes the buttons able to receive keyboard focus so you
  tab through the document.
This commit is contained in:
Neil Williams
2012-12-16 17:44:45 -08:00
parent 25b5683222
commit 2ddfab7e69

View File

@@ -148,6 +148,13 @@ ${self.RenderPrintable()}
%else:
onclick="$(this).show_unvotable_message()"
%endif
role="button"
% if dir > 0:
aria-label="${_("upvote")}"
% else:
aria-label="${_("downvote")}"
% endif
tabindex="0"
>
</div>
</%def>