mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-29 00:38:11 -05:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user