Skip to content

Commit

Permalink
Use more descriptive aria-labels for carousel buttons (ampproject#8453)
Browse files Browse the repository at this point in the history
  • Loading branch information
cvializ authored and aghassemi committed Mar 28, 2017
1 parent 099a246 commit 39a2680
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/amp-carousel/0.1/base-carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class BaseCarousel extends AMP.BaseElement {
this.prevButton_.setAttribute('role', 'button');
// TODO(erwinm): Does label need i18n support in the future? or provide
// a way to be overridden.
this.prevButton_.setAttribute('aria-label', 'previous');
this.prevButton_.setAttribute('aria-label', 'Previous item in carousel');
this.prevButton_.onclick = () => {
this.interactionPrev();
};
Expand All @@ -80,7 +80,7 @@ export class BaseCarousel extends AMP.BaseElement {
this.nextButton_.classList.add('amp-carousel-button');
this.nextButton_.classList.add('amp-carousel-button-next');
this.nextButton_.setAttribute('role', 'button');
this.nextButton_.setAttribute('aria-label', 'next');
this.nextButton_.setAttribute('aria-label', 'Next item in carousel');
this.nextButton_.onclick = () => {
this.interactionNext();
};
Expand Down

0 comments on commit 39a2680

Please sign in to comment.