Practice ยท 3 of 3
Modal Focus Plan
Write focusPlan({ focusables, currentIndex }) returning the NEXT index when Tab is pressed forward and the PREVIOUS when Shift+Tab ({ forward } is boolean). Wrap around at both ends. Also return restoreTo โ always the value passed as restoreIndex (the opener) in the result object.
Difficulty: intermediate
Press Submit to check your solution.
Back to lesson: Practice: Component Systems โ Practice