Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: collapse skin tone picker on blur #17

Merged
merged 1 commit into from Jul 1, 2020
Merged

fix: collapse skin tone picker on blur #17

merged 1 commit into from Jul 1, 2020

Conversation

nolanlawson
Copy link
Owner

@nolanlawson nolanlawson commented Jul 1, 2020

fixes #16

I tested in all three engines in macOS and Ubuntu, as well as iOS Safari, macOS Safari VoiceOver, and NVDA Firefox on Windows. I tested blurring by clicking outside of the skin tone picker, as well as using both the mouse/touch and enter/spacebar to select the buttons. I learned a lot of somewhat arcane things about how browsers handle this stuff.

First off, <button>s behave differently in iOS Safari and Safari/Firefox on Mac. See https://stackoverflow.com/a/42764495/680742 and https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus and

Second off, apparently the way buttons work is that Enter fires on keydown and spacebar fires on keyup. Because it wouldn't be the web if things weren't wildly unpredictable. 馃檭 https://lists.w3.org/Archives/Public/w3c-wai-ig/2019JanMar/0086.html

In any case, this seems to cover all cases, although I should probably test all 3 engines on Windows to be safest.

@nolanlawson nolanlawson merged commit b551e12 into master Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Skin tone dropdown should collapse on blur
1 participant