Because ally.query.focusable can find shadowed elements, util/sort-element-by-tabindex must be extended.
- The
tabindex of an element within a ShadowRoot does not affect the global tabbing order, only the one within the ShadowRoot.
Firefox (currently) ignores positive tabindex [tabindex="1"] within ShadowRoot - these elements are not added to the tabbing order. Firefox sorts tabindex globally, not limited to ShadowRoot.
util/sort-element-by-tabindex should sort the children of a ShadowRoot independently of the document. Within a document, the ShadowRoot must be treated as an immutable group.