apalfrey / select2-bootstrap-5-theme

A Select2 v4 theme for Bootstrap 5
https://apalfrey.github.io/select2-bootstrap-5-theme/
MIT License
212 stars 48 forks source link

Keyboard Accessibility with jQuery 3.6.0 #51

Closed NBA707 closed 2 years ago

NBA707 commented 2 years ago

When I have a select2 field I have to use the mouse to get the keyboard to work. If I tab between fields in the past (Bootstrap-3) I could just start typing. Now it highlights the select2 field but keyboard entry does not work. jQuery 3.5.1 is not compatible so I cannot roll back.

https://jsfiddle.net/a7pz5bsg/3/

If you click on the select it allows keyboard input, but using tab with space or enter keys does not work.

Any ideas?

apalfrey commented 2 years ago

Unfortunately there's nothing I'm able to do to help as this project only styles the select2 element to match with Bootstrap 5.

However, I do remember someone having an issue previously with select2 and jQuery 3.6.0 (#38), seems like they may have a few issues with the latest jQuery at the moment. Looking in their issues, I do see another user seems to be having the same issue select2/select2#6093

Sorry I couldn't be of more help, hope you can find a solution!

NBA707 commented 2 years ago

Thank you for confirming that it's really a Select 2 issue and not an issue with your theme. Will have to wait for Select 2 4.1 to be released (the PR to get the jQuery 3.6.0 perhaps will be incorporated).