Skip to content

Commit

Permalink
react/ratings: hide accessible text for rating buttons to only be vis…
Browse files Browse the repository at this point in the history
…ible for screen readers
  • Loading branch information
vellip authored and m4ra committed Dec 18, 2024
1 parent 8f8906a commit ae6b657
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ exports[`Comment Component renders comment with creator and comment text 1`] = `
Likes
</span>
<span
class="aural"
class="a4-sr-only"
>
Click to like
</span>
Expand All @@ -116,7 +116,7 @@ exports[`Comment Component renders comment with creator and comment text 1`] = `
Dislikes
</span>
<span
class="aural"
class="a4-sr-only"
>
Click to dislike
</span>
Expand Down Expand Up @@ -383,7 +383,7 @@ exports[`Comment Component renders comment with creator and comment text 1`] = `
Likes
</span>
<span
class="aural"
class="a4-sr-only"
>
Click to like
</span>
Expand All @@ -407,7 +407,7 @@ exports[`Comment Component renders comment with creator and comment text 1`] = `
Dislikes
</span>
<span
class="aural"
class="a4-sr-only"
>
Click to dislike
</span>
Expand Down Expand Up @@ -736,7 +736,7 @@ exports[`Comment Component renders comment with moderator badge 1`] = `
Likes
</span>
<span
class="aural"
class="a4-sr-only"
>
Click to like
</span>
Expand All @@ -760,7 +760,7 @@ exports[`Comment Component renders comment with moderator badge 1`] = `
Dislikes
</span>
<span
class="aural"
class="a4-sr-only"
>
Click to dislike
</span>
Expand Down Expand Up @@ -1032,7 +1032,7 @@ exports[`Comment Component renders comment with moderator badge 1`] = `
Likes
</span>
<span
class="aural"
class="a4-sr-only"
>
Click to like
</span>
Expand All @@ -1056,7 +1056,7 @@ exports[`Comment Component renders comment with moderator badge 1`] = `
Dislikes
</span>
<span
class="aural"
class="a4-sr-only"
>
Click to dislike
</span>
Expand Down
2 changes: 1 addition & 1 deletion adhocracy4/ratings/static/ratings/RatingButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const RatingButton = ({
type="button"
>
{children}
<span className="aural">{type === 'up' ? translations.upvote : translations.downvote}</span>
<span className="a4-sr-only">{type === 'up' ? translations.upvote : translations.downvote}</span>
</button>
)
}
Expand Down

0 comments on commit ae6b657

Please sign in to comment.