4 ms·
I wonder why they choose not to use native input element for a checkbox. Was it for a consistent visual theme? Using custom widgets instead of native often lea
by ajitk 14y ago
I wonder why they choose not to use native input element for a checkbox. Was it for a consistent visual theme?
Using custom widgets instead of native often leads to usability issues. In this case, when the a checkbox gains focus, a SPACE BAR scrolls the page instead of toggling its state.
- burriko 14y agoAgreed. This seems great, but ditching standard form elements for a bunch of divs and spans generally ends up an accessibility nightmare. Backbone.UI.Button = an anchor tag with a span inside rather than a button tag. Backbone.UI.Checkbox = an anchor containing some divs rather than an input[type=checkbox]. Radio group and Pulldown give similar output.
- Nervetattoo 14y agoFor me this is a 100% deal breaker. I can understand the desire to dress up checkboxes which doesn't work great as native controls but a lot should be doable just by wrapping it in some custom stuff. Without form elements it has not compatibility with existing solutions, you can't use this to add some interactive components to an existing form and expect to native-submit that form.
- wahnfrieden 14y agoIf you want styled / styleable UI controls which have full accessibility (as a requirement), check out Dijit.
- Timmy_C 14y agoI remember that when Backbone came on the scene, not having to use native elements was a selling point. If you wanted to use native elements you could. But you'd end up having to put `event.preventDefault();` in every one of your event handlers.