Is there a way in CSS to select the label fields which are bound to input fields (via the for attribute) having the required attribute set?
Something like -- label:input[required]
Currently, I'm adding class=required to labels and inputs for styling. I now have the HTML5 attribute required="required" in the required input fields. Would be nice to remove the redundant class attributes.
Closest answer I found was at: http://stackoverflow.com/questions/1431726/css-selector-for-a-checked-radio-buttons-label
However that doesn't use the for attribute, but would require that the label is directly adjacent to the input in the html.