gitbrent / bootstrap4-toggle

Bootstrap 4 Switch Button / Toggle
https://gitbrent.github.io/bootstrap4-toggle/
MIT License
213 stars 67 forks source link

Toggles are not focusable or switchable from the keyboard #56

Open PatrickStephansen opened 3 years ago

PatrickStephansen commented 3 years ago

When filling in a basic HTML form, some users prefer to use only the keyboard, tabbing through the fields and entering values. Normal checkboxes can be toggled by hitting space when they're in focus.

The toggle elements in this project don't set tab index, so they're not focusable from the keyboard. They would need styling to show when they're focused, and key events should be forwarded to the hidden checkbox element.

palcarazm commented 2 years ago

Hi @PatrickStephansen,

I've released a new version for bootstrap 4 and bootstrap 5 in palcarazm/bootstrap5-toggle that support toggle focus and switch from keyboard.

PatrickStephansen commented 2 years ago

Hi @PatrickStephansen,

I've released a new version for bootstrap 4 and bootstrap 5 in palcarazm/bootstrap5-toggle that support toggle focus and switch from keyboard.

Great! Thank you.

manolitooo commented 2 years ago

Hi @PatrickStephansen, I've released a new version for bootstrap 4 and bootstrap 5 in palcarazm/bootstrap5-toggle that support toggle focus and switch from keyboard.

Great! Thank you.

Hi @PatrickStephansen, I have seen you commited changes in Bootstrap 5 project regarding this. But I am not able to find the same for Bootstrap 4's (where this current issue is). The same for other issues where you say you released a new version recently.

Or is it just that Bootstrap 5 release is also backward-compatible with Bootstrap 4?

Sorry my first time in GitHub, it is possible I am missing somewhere.

Thanks in advance.

palcarazm commented 2 years ago

Hi @PatrickStephansen, I've released a new version for bootstrap 4 and bootstrap 5 in palcarazm/bootstrap5-toggle that support toggle focus and switch from keyboard.

Great! Thank you.

Hi @PatrickStephansen, I have seen you commited changes in Bootstrap 5 project regarding this. But I am not able to find the same for Bootstrap 4's (where this current issue is). The same for other issues where you say you released a new version recently.

Or is it just that Bootstrap 5 release is also backward-compatible with Bootstrap 4?

Sorry my first time in GitHub, it is possible I am missing somewhere.

Thanks in advance.

Hi @manolitooo,

in palcarazm/bootstrap5-toggle there're 2 version in maintenance:

The last release for bootstrap 4 is v3.7.1.

The jQuery interface CDN is

<link href="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@3.7.1/css/bootstrap5-toggle.min.css" rel="stylesheet">  
<script src="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@3.7.1/js/bootstrap5-toggle.min.js"></script>
manolitooo commented 2 years ago

Oh, I see. I missed this table, which is very clear:

image

Thank you!