Skip to content

Commit

Permalink
style(esl-carousel): review suggestions for esl-carousel.nav.dots.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Dmytro Shovchko <d.shovchko@gmail.com>
  • Loading branch information
ala-n and dshovchko committed Apr 10, 2024
1 parent e0b2836 commit b415431
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/modules/esl-carousel/plugin/nav/esl-carousel.nav.dots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ export class ESLCarouselNavDots extends ESLBaseElement {
}

protected updateA11y(): void {
this.setAttribute('role', 'group');
this.$$attr('role', 'group');
if (!this.hasAttribute('aria-label')) {
this.setAttribute('aria-label', 'Carousel dots');
this.$$attr('aria-label', 'Carousel dots');
}
}

Expand Down Expand Up @@ -105,8 +105,8 @@ export class ESLCarouselNavDots extends ESLBaseElement {
protected _onKeydown(event: KeyboardEvent): void {
const $eventTarget: HTMLElement = event.target as HTMLElement;
if (ARROW_LEFT === event.key) {
const $nextDot = findPrevLooped($eventTarget, '.carousel-dot') as HTMLElement;
$nextDot.click();
const $prevDot = findPrevLooped($eventTarget, '.carousel-dot') as HTMLElement;
$prevDot.click();
}
if (ARROW_RIGHT === event.key) {
const $nextDot = findNextLooped($eventTarget, '.carousel-dot') as HTMLElement;
Expand Down

0 comments on commit b415431

Please sign in to comment.