focusWithTabindex = function (event) {
  const targetElement = event.map.getTargetElement();
  const rootNode = targetElement.getRootNode();
  const tabIndexCandidate =
    rootNode instanceof ShadowRoot ? rootNode.host : targetElement;

  return tabIndexCandidate.hasAttribute('tabindex') ? focus(event) : true;
}
Return `true` if the map has the focus or no 'tabindex' attribute set.

@param {import("../MapBrowserEvent.js").default} event Map browser event.
@return {boolean} The map container has the focus or no 'tabindex' attribute.