Make reaction counter accessible

This commit is contained in:
tusooa 2023-05-22 22:30:54 -04:00
parent d3e251665f
commit c675130024
No known key found for this signature in database
GPG Key ID: 42AEC43D48433C51
3 changed files with 14 additions and 2 deletions

View File

@ -77,6 +77,17 @@ const EmojiReactions = {
} else {
this.reactWith(emoji)
}
},
counterTriggerAttrs (reaction) {
return {
class: [
'btn',
'button-default',
'emoji-reaction-count-button',
{ '-picked-reaction': this.reactedWith(reaction.name) }
],
'aria-label': this.$tc('status.reaction_count_label', reaction.count, { num: reaction.count })
}
}
}
}

View File

@ -53,7 +53,7 @@
<UserListPopover
:users="accountsForEmoji[reaction.name]"
class="emoji-reaction-popover"
:trigger-attrs="{ class: ['btn', 'button-default', 'emoji-reaction-count-button', { '-picked-reaction': reactedWith(reaction.name) }] }"
:trigger-attrs="counterTriggerAttrs(reaction)"
@show="fetchEmojiReactionsByIfMissing()"
>
<span class="emoji-reaction-counts">{{ reaction.count }}</span>

View File

@ -933,7 +933,8 @@
"show_all_conversation_with_icon": "{icon} {text}",
"show_all_conversation": "Show full conversation ({numStatus} other status) | Show full conversation ({numStatus} other statuses)",
"show_only_conversation_under_this": "Only show replies to this status",
"status_history": "Status history"
"status_history": "Status history",
"reaction_count_label": "{num} person reacted | {num} people reacted"
},
"user_card": {
"approve": "Approve",