Skip to content

Commit

Permalink
Bug 1856388 - use valid ARIA role for moz-five-star r=reusable-compon…
Browse files Browse the repository at this point in the history
…ents-reviewers,tgiles

Made the simple role change and cleaned up a couple warnings related to how `ifDefined` was being used

Differential Revision: https://phabricator.services.mozilla.com/D189827
  • Loading branch information
hannajones committed Oct 17, 2023
1 parent dfeb6c1 commit 865a041
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions toolkit/content/widgets/moz-five-star/moz-five-star.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ export default class MozFiveStar extends MozLitElement {
/>
<div
class="stars"
role="image"
data-l10n-id=${ifDefined(this.title ? null : "moz-five-star-rating")}
role="img"
data-l10n-id=${ifDefined(
this.title ? undefined : "moz-five-star-rating"
)}
data-l10n-args=${ifDefined(
this.title ? null : JSON.stringify({ rating: this.rating ?? 0 })
this.title ? undefined : JSON.stringify({ rating: this.rating ?? 0 })
)}
>
${starFill.map(
Expand Down

0 comments on commit 865a041

Please sign in to comment.