-
-
Notifications
You must be signed in to change notification settings - Fork 311
Shows an error for incorrect usage of .btn #313
Conversation
.btn should only be used on a,button,input or labels Fixes twbs#297
👍 LGTM |
Thanks! |
Some frameworks like Zen Cart makes buttons from |
@lordlouis It's bad semantics (spans don't connote interactivity, buttons and anchors do) and I'm pretty sure it causes accessibility problems. Might be forgivable if you tack on some ARIA attributes... |
indeed, three main issues: in short, to make sure it works for keyboard users and assistive technology users, you end up with at least |
Opened #347. |
Unexpectedly, to Zen Cart's credit, based on http://demo.zen-cart-themes.com/furniture/ it looks like they do I suppose it might be feasible to allow that, but I worry about how many other weird uncommon cases there might be. |
Thank you very much for answering and follow up on my question. @cvrebert as you explain the
If I modify the function so that instead of creating a
I hope this information will be helpful. |
Apparently I'd neglected to add a wiki page for this. Wrote one just now, for the current version of the linter: https://github.com/twbs/bootlint/wiki/E047 |
@cvrebert not sure about |
ah i see. well, in those cases although the |
How would you style a backwards-compatible upload field while following this standard? Normally you would put a styled span that is "click-transparent" over an enlarged upload input, see https://blueimp.github.io/jQuery-File-Upload/ Now I guess I could just make this span a label without for but is this really the right way to go? |
.btn should only be used on a,button,input or labels
Fixes #297