﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
14884	"Visible form <input>s and <textarea> should use the ""required"" attribute"	paulc	nobody	"Per HTML5, as well as to have the ability to style required fields differently, visible form fields should output with the ""required"" attribute if they are required, e.g.


{{{
<input type=""text"" name=""..."" id=""..."" required>
}}}

That may just be a matter of changing the default widget_attrs to return ""required"" by default and add to that in subclasses, e.g.


{{{
class Field(object):
    # ...
    def widget_attrs(self, widget):
        return {'required': 'required'}
}}}

It would be even better if there was a way to output just ""required"", but that would require changes to forms.util.flatatt as far as I can tell.

I'm up to submit a patch if this seems like a good direction, etc."		closed	Forms	dev		wontfix			Unreviewed	0	0	0	0	0	0
