isFocusMovingForward
Checks if the focus is moving forward by comparing the index of the target and relatedTarget element within the focusable elements.
Presentation
function isFocusMovingForward (
document: Document,
target: EventTarget | null,
relatedTarget: EventTarget | null,
): boolean;
Returns
boolean
-True if the focus is moving forward, otherwise false.
Parameters
Name | Type | Description |
---|---|---|
document | Document | |
target | EventTarget | null | @param target The target element where focus is moving to. |
relatedTarget | EventTarget | null | @param relatedTarget The element that previously had focus. |