diff --git a/projects/storefrontlib/layout/a11y/keyboard-focus/skip-focus.directive.ts b/projects/storefrontlib/layout/a11y/keyboard-focus/skip-focus.directive.ts index 6566d0e096d..ac7b67a44d4 100644 --- a/projects/storefrontlib/layout/a11y/keyboard-focus/skip-focus.directive.ts +++ b/projects/storefrontlib/layout/a11y/keyboard-focus/skip-focus.directive.ts @@ -47,9 +47,9 @@ export class SkipFocusDirective implements OnChanges { Array.from(focusableElements || []).forEach((el) => { const element = el as HTMLElement; const shouldSkip = skipSelectors.some((selector) => { - return (element as HTMLElement).matches(selector); + return element.matches(selector); }); - if (!shouldSkip && this.isElementVisible(element as HTMLElement)) { + if (!shouldSkip && this.isElementVisible(element)) { element.setAttribute('tabindex', tabindex); } });