improve tabindex handling