microsoft / tabster

Web Application Keyboard Navigation Tools
https://tabster.io
MIT License
119 stars 36 forks source link

fix(CrossOrigin): Fixing the cross origin version of requestFocus() not waiting for the element to become accessible. #273

Closed mshoho closed 1 year ago

mshoho commented 1 year ago

observedElement.requestFocus() can wait for an element to become accessible within the specified timeout and focus it right after. The cross origin version internally wasn't passing the argument to do so — if an observed element existed on the page but wasn't accessible (like having aria-hidden, for example), requestFocus() was immediately returning with no focused element.