New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Opening button doesn't get focus when modal closes in iOS with VoiceOver #100
Comments
As commented in #99, we seem to be running into is a random result in the 'return to last focus state' where VoiceOver, if it can't find/remember the state for whatever reason, will default to a focusable element nearest the last press being the close button of the modal. What JavaScript we've tested so far doesn't seem to have much difference as VoiceOver will make its own decisions on where to go and ignore what we're asking it to do. In short, needs more work but the issue is understood. Contribution on this from anyone is very welcome. |
For this one, you likely need to pass in a reference to the opening element (or actually keep track of what opened it when it triggers the modal) to explicitly focus that element (instead of |
Thanks @backwardok - we already do keep track of the original element at the point the modal is triggered to open, only it hasn't been used by VoiceOver correctly or as expected. The replies to #99 have given us a good base and reference point to work from, so we expect to have updates to this task as well rolled into that. Thanks again! |
Issue
Steps to reproduce:
What's expected:
VO focus moves back to the Show Modaal button
What happens:
VO focus is at the end of the page (where the modal previously existed)
What's going on
MDN's activeElement documentation mentions that on a Mac, this may only work with text inputs. I found that this is only true on iOS and not on the Mac. If you are on a button that's focused and you query for
activeElement
, it doesn't return anything.The text was updated successfully, but these errors were encountered: