I feel it should be good to have separate if basic unit tests for firstFocusableChild, lasyFocusableChild, isDecendantOf, to ensure you can rely on their behavior when looking at ListItem tests.
+ // first or the last focus child is reached, so we wrap around
Do we really want wrap-around? I'm double-checking because we planned to not have it for Tab focus in general, see bug 1523821, unless that decision has been re-considered in the meantime.
I feel it should be good to have separate if basic unit tests for firstFocusableC hild, lasyFocusableChild, isDecendantOf, to ensure you can rely on their behavior when looking at ListItem tests.
+ // first or the last focus child is reached, so we wrap around
Do we really want wrap-around? I'm double-checking because we planned to not have it for Tab focus in general, see bug 1523821, unless that decision has been re-considered in the meantime.