First of all, thanks for the great library.
We are using grommet on our platform and it works great. However, we found a small bug.
Easy blur by clicking away from the Radio Buttons. Here is an example from w3c where I can easily blur and use the arrows to move the window content.
https://recordit.co/dhjc0gBN7F
Struggle to fire the blur on Radio Buttons. If you try the same process on your documentation you have to put up a bit of a fight to get the blur to fire and be able to use the arrows to move the window content rather than the radio button selection
its your Environment :)
Thank you for your feedback @santaclauze !
I took a look at the WebAIM accessibility recommendations, https://webaim.org/techniques/forms/controls#radio
And IMO its radio-button behavior is similar to grommet RadioButtonGroup. From the WebAIM example, the user will keep navigating inside the radio-button-group as long the user is using up/down navigations, and for leaving the radio-button-group the user can use Tab which is similar to the grommet behavior.
An enhancement request from our end could be to allow cyclic navigation between the radio button options as shown in the WebAIM example.
let me know what you think and enlight me if I'm missing something.
@ShimiSun, I think the issue is that it's really hard to wrest control from the RadioButtonGroup once it has you.
E.g. On the RadioButtonGroup docs page. If the RBG has focus, you can move up and down with arrow keys, as expected, but when you click in the sandbox textarea to the right, even though you can see the caret flashing, hitting the up/down arrows will still change the selected radio button!
https://www.youtube.com/watch?v=mXlgXJbks2c
In that video, I navigate between radio buttons with arrow keys, then click into the textarea and start typing, all good. Then at 0:15 I click into the textarea and hit up and down arrows.
Interestingly if you click in that sandbox textarea then start typing/deleting/backspacing, the RBG _does_ lose focus.
Also, to tab away from the RadioButtonGroup I have to hit the tab key twice, not once?
P.S. When this issue was first reported to us by our testers we also assumed that it was expected behaviour as seen on radio button groups everywhere 馃檪
@ShimiSun, the issue seems to have been resolved in v2.8.1 and I can no longer reproduce the bug on: https://v2.grommet.io/radiobuttongroup 馃憤
Most helpful comment
@ShimiSun, I think the issue is that it's really hard to wrest control from the RadioButtonGroup once it has you.
E.g. On the RadioButtonGroup docs page. If the RBG has focus, you can move up and down with arrow keys, as expected, but when you click in the sandbox textarea to the right, even though you can see the caret flashing, hitting the up/down arrows will still change the selected radio button!
https://www.youtube.com/watch?v=mXlgXJbks2c
In that video, I navigate between radio buttons with arrow keys, then click into the textarea and start typing, all good. Then at 0:15 I click into the textarea and hit up and down arrows.
Interestingly if you click in that sandbox textarea then start typing/deleting/backspacing, the RBG _does_ lose focus.
Also, to tab away from the RadioButtonGroup I have to hit the tab key twice, not once?
P.S. When this issue was first reported to us by our testers we also assumed that it was expected behaviour as seen on radio button groups everywhere 馃檪