aditum
aditum copied to clipboard
FocusWrapper on initial page load?
I reviewed your FocusWrapper implementation which sets focus on a wrapper element containing the contents of a Route's component whenever there is a route change. I think it's safe to assume an applications "chrome" (header and menu) will exist outside the Router instance. That being the case, you would only want to set focus on the route contents when a navigation action is initiated by the user, not on initial page load. Doing it on initial page load (which is what I found the FocusWrapper does with a POC) is not appropriate because it will skip all navigation.
Please advise.