Creates an instance of FocusListManager
The focus list's element
The value of the v-focus-list attribute which tells the focus list manager the orientation of the list. 'horizontal' means the list should be traversed horizontally, and other value will make the list vertical (including no value).
Removes 'focused' to the class list of item then updates the tabIndex on subitems (setting them to -1).
The element to defocus
Adds 'focused' to the class list of item then updates the tabIndex on subitems (setting them to 0).
The element to focus
Callback for the BLUR event listener on the focus list element. NOTE: this is only called when the list element stops being focused, not a descendant
Callback for the click event listener on the focus list element
click event
Callback for the focus event listener on the focus list element. NOTE: this is only called when the LIST ELEMENT is focused, not any descendant
This is used to pull back the focusedItem id and the aria-activedescendant attribute when a list is focused
Callback for the keydown event listener on the focus list element
keydown event
Callback for the MOUSEDOWN event listener on the focus list element.
Callback for the TOUCHSTART event listener on the focus list element.
Updates the list's aria-activedescendant to be item
The element that should be the active descendant
Sets tabindex to value for every tabbable thing under focusItem (or the list if not specified)
the value to give tabindex on each tabbable item
the element containing the tabbable items, defaults to the focus list
Moves the highlight through the listOfItems forward (or backward) 1 spot
The list of items being moved through
true iff the highlight should move back one spot
The FocusListManager class
Each instance of this class is tied to an element. These are created in the bind function for the
FocusListdirective. This class manages the focus within the element, mainly moving betweenfocus-items with arrow keys.