Update arial label for gr-change-star button
Change-Id: I99cebc33c45867ce40290be2eb4b8f41747948ca
This commit is contained in:
@@ -53,6 +53,10 @@ class GrChangeStar extends GestureEventListeners(
|
||||
return `gr-icons:star${starred ? '' : '-border'}`;
|
||||
}
|
||||
|
||||
_computeAriaLabel(starred) {
|
||||
return starred ? 'Unstar this change' : 'Star this change';
|
||||
}
|
||||
|
||||
toggleStar() {
|
||||
const newVal = !this.change.starred;
|
||||
this.set('change.starred', newVal);
|
||||
|
||||
@@ -37,7 +37,11 @@ export const htmlTemplate = html`
|
||||
);
|
||||
}
|
||||
</style>
|
||||
<button aria-label="Change star" on-click="toggleStar">
|
||||
<button
|
||||
role="checkbox"
|
||||
aria-label="[[_computeAriaLabel(change.starred)]]]"
|
||||
on-click="toggleStar"
|
||||
>
|
||||
<iron-icon
|
||||
class$="[[_computeStarClass(change.starred)]]"
|
||||
icon$="[[_computeStarIcon(change.starred)]]"
|
||||
|
||||
Reference in New Issue
Block a user