elo80ka / django-dynamic-formset

A jQuery plugin that allows you dynamically add new forms to a rendered django formset.
675 stars 309 forks source link

Add / remove buttons should be buttons, not anchors #122

Closed coilysiren closed 5 years ago

coilysiren commented 7 years ago

This line https://github.com/elo80ka/django-dynamic-formset/blob/e10c0a22acc0c6152c9dfb95c4ba2f853502110e/src/jquery.formset.js#L187

(and a few other related lines)

Should be creating button elements instead of a. The reasoning behind this is that screenreaders and other HTML parsers assume that a elements will change the page location. This is why you have to add href="javascript:void(0)"

Buttons on the other hand, could be used to change the page contents without having to suppress a redirect

andrewwong97 commented 7 years ago

I've had the same issue. Have you found a fix?

coilysiren commented 5 years ago

I'm closing a bunch of my older github issues ♻️ feel free to open a new issue describing this same change! Or re-open this one, if someone is still interested in working on it 📝