Creates a virtual tab stop portal where an element that resides elsewhere in the DOM is
treated as if it were immediately before or after another element while tab navigating.
This allows for elements to be placed anywhere in the DOM, but retain a logical tab order.
Note: only beforeorafter can be set, not both.
Clicking outside the portal container will deactivate the portal.
There are 4 virtual tab stops managed by the TabStopPortal:
When placed after an element, the tab order looks like this:
A1. When tabbing forward past the "after" element, the first element in the portal is focused
A2. When tabbing forward past the last element in the portal, the "next" element is focused
A3. When tabbing backward past the "next" element, the last element in the portal is focused
A4. When tabbing backward past the first element in the portal, the "after" element is focused
B1. When tabbing forward past the "previous" element, the first element in the portal is focused
B2. When tabbing forward past the last element in the portal, the "before" element is focused
B3. When tabbing backward past the "before" element, the last element in the portal is focused
B4. When tabbing backward past the first element in the portal, the "previous" element is focused
Creates a virtual tab stop portal where an element that resides elsewhere in the DOM is treated as if it were immediately before or after another element while tab navigating.
This allows for elements to be placed anywhere in the DOM, but retain a logical tab order.
Clicking outside the portal container will deactivate the portal.
There are 4 virtual tab stops managed by the TabStopPortal:
When placed
afteran element, the tab order looks like this:["previous" element] -> ["after" element] -> [portal] -> ["next" element]
A1. When tabbing forward past the "after" element, the first element in the portal is focused A2. When tabbing forward past the last element in the portal, the "next" element is focused A3. When tabbing backward past the "next" element, the last element in the portal is focused A4. When tabbing backward past the first element in the portal, the "after" element is focused
When placed
beforean element:["previous" element] -> [portal] -> ["before" element] -> ["next" element]
B1. When tabbing forward past the "previous" element, the first element in the portal is focused B2. When tabbing forward past the last element in the portal, the "before" element is focused B3. When tabbing backward past the "before" element, the last element in the portal is focused B4. When tabbing backward past the first element in the portal, the "previous" element is focused