-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Missing focus states/events for radio buttons in VPN-support dialog #22631
Comments
++reproduced on window 10 x64 |
works for me, @GeetaSarvadnya @stephendonner could you recheck pls? |
Not working for me, see below. |
Thanks for taking a look @GeetaSarvadnya. Even in this video, we can see that the radio buttons themselves are only selectable/tab-able via the mouse. Keyboard operations work but only the country labels get a focus ring. IMHO (back me up @aguscruiz!) there should be a focus ring on the radio buttons, same as there currently is for the country labels' controls. |
(The radio buttons clearly have a selected state, but not the focused one I'd expect from |
cc: @fallaciousreasoning in case this was an interesting one for possible Nala cleanup 🙂 Problem is with the keyboard shortcut usage - it's not treating the radio button as linked to the label (like it was one cohesive control). |
How are these buttons laid out? Because keyboard controls work nicely in our test page: Screencast.from.2024-02-26.09-23-01.webmIs there a chance you're using them inside another label? <label>
<LeoRadiobutton/>
Foo
</label> The radiobutton already has a label inside it, so correct usage would be:
|
Oh wait, this isn't actually using the Nala radio buttons at all. I could migrate it over, but I'm on Linux so I don't have the VPN. Should be something like this though: import RadioButton from '@brave/leo/react/radiobutton'
// ...
{regions.map(r => <RadioButton key={r.countryIsoCode} name="region" value={r.countryIsoCode} selectedValue={currentRegion?.countryIsoCode} onChange={e => setSelectedRegion(r)} /> |
That is correct (this is not using Nala... yet). It would be great to add - but that's right, you're on Linux 😂 |
Description
Missing focus states/events for radio buttons in VPN-support dialog
Steps to Reproduce
1.39.86
development
env for the SKUs SDK (lots of separate steps)tab
/shift+tab
(reverse) to try to cycle through the radio buttons of the elementsActual result:
Radio button controls are not in the
tabindex
and are skippedExpected result:
Each element and their radio-button control should be tab-focusable/have a focus ring
Reproduces how often:
100%
Brave version (brave://version info)
@bsclifton @aguscruiz @nullhook
The text was updated successfully, but these errors were encountered: