You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

16 lines
483 B

import { FocusableOption } from '@angular/cdk/a11y';
import { Directive, ElementRef, HostBinding } from '@angular/core';
@Directive({
selector: '[gf-carousel-item]'
})
export class CarouselItem implements FocusableOption {
@HostBinding('attr.role') readonly role = 'listitem';
@HostBinding('tabindex') tabindex = '-1';
public constructor(readonly element: ElementRef<HTMLElement>) {}
public focus() {
this.element.nativeElement.focus({ preventScroll: true });
}
}