Gecko sorts elements with [tabindex=1] into the document's tabbing sequence as if they were not hidden away in a ShadowRoot. Shadow DOM 6.2 Focus Navgation says that all the (entire) tabbing sequence of the ShadowRoot must be inserted into the document's tabbing sequence at one point.

In Firefox the setting dom.webcomponents.enabled needs to be set to true to enable ShadowDOM support.