GoogleChromeLabs / proxx

A game of proximity
https://proxx.app
Apache License 2.0
1.32k stars 124 forks source link

[A11y] regression on "move focus back when closing dialog." #387

Closed kosamari closed 5 years ago

kosamari commented 5 years ago

@jakearchibald perhaps you can spot why.... I could not really figure out :/

When info icon is clicked, we keep the focus reference so that we can focus back to the info icon when user close the dialog. This used to work, but somehow on current master it doesn't.

_onSettingsCloseClick is being called & previousFocus reference is correct, but somehow .focus() is not taking effect.

https://github.com/GoogleChromeLabs/proxx/blob/master/src/services/preact-canvas/index.tsx#L358-L361