projects/storefrontlib/layout/a11y/keyboard-focus/lock/lock-focus.service.ts
Properties |
|
Methods |
|
| Protected getTrapEnd | ||||||
getTrapEnd(trap: TrapFocusType)
|
||||||
|
Inherited from
TrapFocusService
|
||||||
|
Defined in
TrapFocusService:64
|
||||||
|
Parameters :
Returns :
boolean
|
| Protected getTrapStart | ||||||
getTrapStart(trap: TrapFocusType)
|
||||||
|
Inherited from
TrapFocusService
|
||||||
|
Defined in
TrapFocusService:60
|
||||||
|
Parameters :
Returns :
boolean
|
| hasFocusableChildren | ||||||||
hasFocusableChildren(host: HTMLElement)
|
||||||||
|
Inherited from
TrapFocusService
|
||||||||
|
Defined in
TrapFocusService:19
|
||||||||
|
Indicates whether any of the child elements of the host are focusable.
Parameters :
Returns :
boolean
|
| moveFocus | |||||||||||||||
moveFocus(host: HTMLElement, config: TrapFocusConfig, increment: MOVE_FOCUS, event: UIEvent)
|
|||||||||||||||
|
Inherited from
TrapFocusService
|
|||||||||||||||
|
Defined in
TrapFocusService:28
|
|||||||||||||||
|
Focus the next or previous element of all available focusable elements. The focus is trapped in case there's no next or previous available element. The focus will automatically move the start or end of the list.
Parameters :
Returns :
void
|
| findFocusable | ||||||||||||||||||||
findFocusable(host: HTMLElement, locked, invisible)
|
||||||||||||||||||||
|
Inherited from
TabFocusService
|
||||||||||||||||||||
|
Defined in
TabFocusService:136
|
||||||||||||||||||||
|
Returns all focusable child elements of the host element.
Parameters :
Returns :
HTMLElement[]
|
| Protected findNext | ||||||||||||
findNext(host: HTMLElement, config: TabFocusConfig, increment: MOVE_FOCUS)
|
||||||||||||
|
Inherited from
TabFocusService
|
||||||||||||
|
Defined in
TabFocusService:74
|
||||||||||||
|
Parameters :
Returns :
HTMLElement
|
| Protected findNextScrollable | ||||||||||||
findNextScrollable(host: HTMLElement, config: TabFocusConfig, increment: MOVE_FOCUS)
|
||||||||||||
|
Inherited from
TabFocusService
|
||||||||||||
|
Defined in
TabFocusService:36
|
||||||||||||
|
builds out virtual slides out of the full scrollable area, to allow for maximum flexibility for the underlying layout without using hardcoded slide sizes.
Parameters :
Returns :
HTMLElement
|
| Protected getActiveChild | |||||||||
getActiveChild(host: HTMLElement, config: TabFocusConfig)
|
|||||||||
|
Inherited from
TabFocusService
|
|||||||||
|
Defined in
TabFocusService:102
|
|||||||||
|
Returns the active focusable child element. If there's no active focusable child element, the first focusable child is returned.
Parameters :
Returns :
HTMLElement
|
| Protected getChildren | |||||||||
getChildren(host: HTMLElement, config: TabFocusConfig)
|
|||||||||
|
Inherited from
TabFocusService
|
|||||||||
|
Defined in
TabFocusService:118
|
|||||||||
|
Parameters :
Returns :
HTMLElement[]
|
| Protected isActive | ||||||
isActive(el: HTMLElement)
|
||||||
|
Inherited from
TabFocusService
|
||||||
|
Defined in
TabFocusService:144
|
||||||
|
Parameters :
Returns :
boolean
|
| moveTab | |||||||||||||||
moveTab(host: HTMLElement, config: TabFocusConfig, increment: MOVE_FOCUS, event: KeyboardEvent)
|
|||||||||||||||
|
Inherited from
TabFocusService
|
|||||||||||||||
|
Defined in
TabFocusService:12
|
|||||||||||||||
|
Moves to the next (or previous) tab.
Parameters :
Returns :
void
|
| findFirstFocusable | ||||||||||||
findFirstFocusable(host: HTMLElement, config: AutoFocusConfig)
|
||||||||||||
|
Inherited from
AutoFocusService
|
||||||||||||
|
Defined in
AutoFocusService:16
|
||||||||||||
|
Returns the first focusable child element of the host element.
Parameters :
Returns :
HTMLElement
|
| Protected getPersisted | ||||||||||||
getPersisted(host: HTMLElement, group?: string)
|
||||||||||||
|
Inherited from
AutoFocusService
|
||||||||||||
|
Defined in
AutoFocusService:43
|
||||||||||||
|
Returns the element that has a persisted focus state. groups and remain the persistence
Parameters :
Returns :
HTMLElement
|
| hasPersistedFocus | |||||||||
hasPersistedFocus(host: HTMLElement, config: PersistFocusConfig)
|
|||||||||
|
Inherited from
AutoFocusService
|
|||||||||
|
Defined in
AutoFocusService:32
|
|||||||||
|
Indicates whether any of the focusable child elements is focused.
Parameters :
Returns :
boolean
|
| handleEscape | ||||||||||||
handleEscape(host: HTMLElement, config: EscapeFocusConfig, event: KeyboardEvent)
|
||||||||||||
|
Inherited from
EscapeFocusService
|
||||||||||||
|
Defined in
EscapeFocusService:18
|
||||||||||||
|
Parameters :
Returns :
void
|
| shouldFocus | ||||||
shouldFocus(config: EscapeFocusConfig)
|
||||||
|
Inherited from
EscapeFocusService
|
||||||
|
Defined in
EscapeFocusService:14
|
||||||
|
Parameters :
Returns :
boolean
|
| clear | ||||||
clear(group?: string)
|
||||||
|
Inherited from
PersistFocusService
|
||||||
|
Defined in
PersistFocusService:38
|
||||||
|
Clears the persisted keyboard focus state globally or for the given group.
Parameters :
Returns :
void
|
| get | ||||||
get(group?: string)
|
||||||
|
Inherited from
PersistFocusService
|
||||||
|
Defined in
PersistFocusService:21
|
||||||
|
Parameters :
Returns :
string
|
| getPersistenceGroup | |||||||||
getPersistenceGroup(host: HTMLElement, config?: PersistFocusConfig)
|
|||||||||
|
Inherited from
PersistFocusService
|
|||||||||
|
Defined in
PersistFocusService:46
|
|||||||||
|
Returns the group for the host element based on the configured group or
by the
Parameters :
Returns :
string
|
| set |
set(key: string, group?: string)
|
|
Inherited from
PersistFocusService
|
|
Defined in
PersistFocusService:29
|
|
Persist the keyboard focus state for the given key. The focus is stored globally or for the given group.
Returns :
void
|
| Protected focus |
Default value : new Map<string, string>()
|
|
Inherited from
PersistFocusService
|
|
Defined in
PersistFocusService:19
|
import { Injectable } from '@angular/core';
import { TrapFocusService } from '../trap/trap-focus.service';
@Injectable({
providedIn: 'root',
})
export class LockFocusService extends TrapFocusService {}