added aria-pressed values to reaction buttons (#14192)
This commit is contained in:
parent
708fc9e2a1
commit
8e2e25fbb9
2 changed files with 3 additions and 0 deletions
|
|
@ -37,6 +37,7 @@ function showUserReaction(reactionName, animatedClass) {
|
|||
'aria-label',
|
||||
getReactionAriaLabel(reactionName, true),
|
||||
);
|
||||
reactionButton.setAttribute('aria-pressed', 'true');
|
||||
}
|
||||
|
||||
function hideUserReaction(reactionName) {
|
||||
|
|
@ -48,6 +49,7 @@ function hideUserReaction(reactionName) {
|
|||
'aria-label',
|
||||
getReactionAriaLabel(reactionName, false),
|
||||
);
|
||||
reactionButton.setAttribute('aria-pressed', 'false');
|
||||
}
|
||||
|
||||
function hasUserReacted(reactionName) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<button
|
||||
id="reaction-butt-<%= category %>"
|
||||
aria-label="<%= aria_label %>"
|
||||
aria-pressed="false"
|
||||
class="crayons-reaction crayons-reaction--<%= category %>"
|
||||
data-category="<%= category %>"
|
||||
title="<%= description %>">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue